diff options
author | Jiri Olsa <jolsa@kernel.org> | 2015-10-25 15:51:27 +0100 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2015-12-17 14:38:18 -0300 |
commit | 374fb9e362f64e730388abc1de9bb93829670a54 (patch) | |
tree | a438a34f267430ea49ff346960f5e7efee08b0a8 /tools/perf/util/event.h | |
parent | eb12a1afdc02e59fc09934743490549c77327b1a (diff) |
perf tools: Add stat config user level event
Adding the stat config event to pass/store stat config data, so report
tools (report/script) know how to interpret stat data.
The config data is stored in a 'tag|value' way to allow for easy
extension and backwards compatibility.
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/1445784728-21732-12-git-send-email-jolsa@kernel.org
[ stat_config_term_event -> stat_config_event_entry ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/event.h')
-rw-r--r-- | tools/perf/util/event.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tools/perf/util/event.h b/tools/perf/util/event.h index 74a434116b2c..16cee44de56b 100644 --- a/tools/perf/util/event.h +++ b/tools/perf/util/event.h @@ -228,6 +228,7 @@ enum perf_user_event_type { /* above any possible kernel type */ PERF_RECORD_AUXTRACE_ERROR = 72, PERF_RECORD_THREAD_MAP = 73, PERF_RECORD_CPU_MAP = 74, + PERF_RECORD_STAT_CONFIG = 75, PERF_RECORD_HEADER_MAX }; @@ -395,6 +396,24 @@ struct thread_map_event { struct thread_map_event_entry entries[]; }; +enum { + PERF_STAT_CONFIG_TERM__AGGR_MODE = 0, + PERF_STAT_CONFIG_TERM__INTERVAL = 1, + PERF_STAT_CONFIG_TERM__SCALE = 2, + PERF_STAT_CONFIG_TERM__MAX = 3, +}; + +struct stat_config_event_entry { + u64 tag; + u64 val; +}; + +struct stat_config_event { + struct perf_event_header header; + u64 nr; + struct stat_config_event_entry data[]; +}; + union perf_event { struct perf_event_header header; struct mmap_event mmap; @@ -419,6 +438,7 @@ union perf_event { struct context_switch_event context_switch; struct thread_map_event thread_map; struct cpu_map_event cpu_map; + struct stat_config_event stat_config; }; void perf_event__print_totals(void); |