diff options
author | Jiri Olsa <jolsa@kernel.org> | 2016-01-05 16:09:08 -0500 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2016-01-06 18:11:15 -0500 |
commit | 8058a30ce174060a3c8156dc87b4d4ae39e8281b (patch) | |
tree | ac51cf6ffa7c5b20f1d1628255a8522fb8254160 /tools/perf | |
parent | 91a2c3d54fd4b5be4e25acc1d8c1cc9a28319774 (diff) |
perf script: Add process_stat/process_stat_interval scripting interface
Python and perl scripting code will define those callbacks and get stat
data.
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Tested-by: Kan Liang <kan.liang@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1452028152-26762-5-git-send-email-jolsa@kernel.org
[ Rename 'time' parameters to 'tstamp', to fix the build in older distros ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf')
-rw-r--r-- | tools/perf/util/trace-event.h | 4 |
1 files changed, 4 insertions, 0 deletions
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); | |||
65 | struct addr_location; | 65 | struct addr_location; |
66 | 66 | ||
67 | struct perf_session; | 67 | struct perf_session; |
68 | struct perf_stat_config; | ||
68 | 69 | ||
69 | struct scripting_ops { | 70 | struct scripting_ops { |
70 | const char *name; | 71 | const char *name; |
@@ -75,6 +76,9 @@ struct scripting_ops { | |||
75 | struct perf_sample *sample, | 76 | struct perf_sample *sample, |
76 | struct perf_evsel *evsel, | 77 | struct perf_evsel *evsel, |
77 | struct addr_location *al); | 78 | struct addr_location *al); |
79 | void (*process_stat)(struct perf_stat_config *config, | ||
80 | struct perf_evsel *evsel, u64 tstamp); | ||
81 | void (*process_stat_interval)(u64 tstamp); | ||
78 | int (*generate_script) (struct pevent *pevent, const char *outfile); | 82 | int (*generate_script) (struct pevent *pevent, const char *outfile); |
79 | }; | 83 | }; |
80 | 84 | ||