From: Jiri Olsa Date: Tue, 5 Jan 2016 21:09:08 +0000 (+0100) Subject: perf script: Add process_stat/process_stat_interval scripting interface X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=8058a30ce174060a3c8156dc87b4d4ae39e8281b;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Tested-by: Kan Liang Cc: David Ahern Cc: Namhyung Kim Cc: Peter Zijlstra 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 --- 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); };