[PATCH 25/59] perf script: Add process_stat/process_stat_interval scripting interface
From: Arnaldo Carvalho de Melo
Date: Fri Jan 08 2016 - 13:04:18 EST
From: Jiri Olsa <jolsa@xxxxxxxxxx>
Python and perl scripting code will define those callbacks and get stat
data.
Signed-off-by: Jiri Olsa <jolsa@xxxxxxxxxx>
Tested-by: Kan Liang <kan.liang@xxxxxxxxx>
Cc: David Ahern <dsahern@xxxxxxxxx>
Cc: Namhyung Kim <namhyung@xxxxxxxxxx>
Cc: Peter Zijlstra <a.p.zijlstra@xxxxxxxxx>
Link: http://lkml.kernel.org/r/1452028152-26762-5-git-send-email-jolsa@xxxxxxxxxx
[ Rename 'time' parameters to 'tstamp', to fix the build in older distros ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
---
tools/perf/util/trace-event.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/tools/perf/util/trace-event.h b/tools/perf/util/trace-event.h
index b85ee55cca0c..bce5b1dac268 100644
--- a/tools/perf/util/trace-event.h
+++ b/tools/perf/util/trace-event.h
@@ -65,6 +65,7 @@ int tracing_data_put(struct tracing_data *tdata);
struct addr_location;
struct perf_session;
+struct perf_stat_config;
struct scripting_ops {
const char *name;
@@ -75,6 +76,9 @@ struct scripting_ops {
struct perf_sample *sample,
struct perf_evsel *evsel,
struct addr_location *al);
+ void (*process_stat)(struct perf_stat_config *config,
+ struct perf_evsel *evsel, u64 tstamp);
+ void (*process_stat_interval)(u64 tstamp);
int (*generate_script) (struct pevent *pevent, const char *outfile);
};
--
2.1.0