diff options
author | Jiri Olsa <jolsa@kernel.org> | 2015-10-25 15:51:30 +0100 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2015-12-17 14:38:20 -0300 |
commit | d80518c90bb2b4af9755d79af5dfe9d44e04cdb9 (patch) | |
tree | 64cf372c364b5115d974ce1fb47be859d761c229 /tools/perf/util/event.h | |
parent | 8e381596b67af53564a69f16440d3e5d5a73d034 (diff) |
perf tools: Add stat user level event
Adding a stat event to store a 'struct perf_counter_values' for a given
event/cpu/thread.
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-15-git-send-email-jolsa@kernel.org
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 | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tools/perf/util/event.h b/tools/perf/util/event.h index 4e87be2e1afa..f23f464c680a 100644 --- a/tools/perf/util/event.h +++ b/tools/perf/util/event.h @@ -229,6 +229,7 @@ enum perf_user_event_type { /* above any possible kernel type */ PERF_RECORD_THREAD_MAP = 73, PERF_RECORD_CPU_MAP = 74, PERF_RECORD_STAT_CONFIG = 75, + PERF_RECORD_STAT = 76, PERF_RECORD_HEADER_MAX }; @@ -414,6 +415,23 @@ struct stat_config_event { struct stat_config_event_entry data[]; }; +struct stat_event { + struct perf_event_header header; + + u64 id; + u32 cpu; + u32 thread; + + union { + struct { + u64 val; + u64 ena; + u64 run; + }; + u64 values[3]; + }; +}; + union perf_event { struct perf_event_header header; struct mmap_event mmap; @@ -439,6 +457,7 @@ union perf_event { struct thread_map_event thread_map; struct cpu_map_event cpu_map; struct stat_config_event stat_config; + struct stat_event stat; }; void perf_event__print_totals(void); |