From a16ac0233ea1da8af3c2046a67c2527b4a452166 Mon Sep 17 00:00:00 2001 From: Adrian Hunter Date: Thu, 9 Apr 2015 18:53:43 +0300 Subject: perf tools: Add user events for AUX area tracing Add two user events for AUX area tracing. PERF_RECORD_AUXTRACE_INFO contains metadata, consisting primarily the type of the AUX area tracing data plus some amount of architecture-specific information. There should be only one PERF_RECORD_AUXTRACE_INFO event. PERF_RECORD_AUXTRACE identifies AUX area tracing data copied from the mmapped AUX area tracing region. The actual data is not part of the event but immediately follows it. Signed-off-by: Adrian Hunter Acked-by: Jiri Olsa Cc: David Ahern Cc: Frederic Weisbecker Cc: Namhyung Kim Cc: Peter Zijlstra Cc: Stephane Eranian Link: http://lkml.kernel.org/r/1428594864-29309-4-git-send-email-adrian.hunter@intel.com [ s/MIN/min/g and use cast to fix up wrt -Werror=sign-compare till we adopt min_t() ] Signed-off-by: Arnaldo Carvalho de Melo Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/util/event.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'tools/perf/util/event.h') diff --git a/tools/perf/util/event.h b/tools/perf/util/event.h index 09b9e8d3fcf7..6d81beca1f27 100644 --- a/tools/perf/util/event.h +++ b/tools/perf/util/event.h @@ -215,6 +215,8 @@ enum perf_user_event_type { /* above any possible kernel type */ PERF_RECORD_HEADER_BUILD_ID = 67, PERF_RECORD_FINISHED_ROUND = 68, PERF_RECORD_ID_INDEX = 69, + PERF_RECORD_AUXTRACE_INFO = 70, + PERF_RECORD_AUXTRACE = 71, PERF_RECORD_HEADER_MAX }; @@ -280,6 +282,24 @@ struct id_index_event { struct id_index_entry entries[0]; }; +struct auxtrace_info_event { + struct perf_event_header header; + u32 type; + u32 reserved__; /* For alignment */ + u64 priv[]; +}; + +struct auxtrace_event { + struct perf_event_header header; + u64 size; + u64 offset; + u64 reference; + u32 idx; + u32 tid; + u32 cpu; + u32 reserved__; /* For alignment */ +}; + union perf_event { struct perf_event_header header; struct mmap_event mmap; @@ -295,6 +315,8 @@ union perf_event { struct tracing_data_event tracing_data; struct build_id_event build_id; struct id_index_event id_index; + struct auxtrace_info_event auxtrace_info; + struct auxtrace_event auxtrace; }; void perf_event__print_totals(void); -- cgit v1.2.3