aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/event.h
diff options
context:
space:
mode:
authorTom Zanussi <tzanussi@gmail.com>2010-04-02 00:59:19 -0400
committerIngo Molnar <mingo@elte.hu>2010-04-14 05:56:07 -0400
commit2c46dbb517a10b18d459e6ceffefde5bfb290cf6 (patch)
tree20853decc73cd1fc69c2db7d8227d11cce6ee4de /tools/perf/util/event.h
parentc239da3b4b55dbb8f30bcb8d1a0d63fc44a567c3 (diff)
perf: Convert perf header attrs into attr events
Bypasses the attr perf header code and replaces it with a synthesized event and processing function that accomplishes the same thing, used when reading/writing perf data to/from a pipe. Making the attrs into events allows them to be streamed over a pipe along with the rest of the header data (in later patches). It also paves the way to allowing events to be added and removed from perf sessions dynamically. Signed-off-by: Tom Zanussi <tzanussi@gmail.com> Acked-by: Thomas Gleixner <tglx@linutronix.de> Cc: fweisbec@gmail.com Cc: rostedt@goodmis.org Cc: k-keiichi@bx.jp.nec.com Cc: acme@ghostprotocols.net LKML-Reference: <1270184365-8281-6-git-send-email-tzanussi@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'tools/perf/util/event.h')
-rw-r--r--tools/perf/util/event.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/tools/perf/util/event.h b/tools/perf/util/event.h
index 5c1eba671305..b4fbf25078b9 100644
--- a/tools/perf/util/event.h
+++ b/tools/perf/util/event.h
@@ -84,7 +84,14 @@ struct build_id_event {
84}; 84};
85 85
86enum perf_header_event_type { /* above any possible kernel type */ 86enum perf_header_event_type { /* above any possible kernel type */
87 PERF_RECORD_HEADER_MAX = 64, 87 PERF_RECORD_HEADER_ATTR = 64,
88 PERF_RECORD_HEADER_MAX
89};
90
91struct attr_event {
92 struct perf_event_header header;
93 struct perf_event_attr attr;
94 u64 id[];
88}; 95};
89 96
90typedef union event_union { 97typedef union event_union {
@@ -96,6 +103,7 @@ typedef union event_union {
96 struct lost_event lost; 103 struct lost_event lost;
97 struct read_event read; 104 struct read_event read;
98 struct sample_event sample; 105 struct sample_event sample;
106 struct attr_event attr;
99} event_t; 107} event_t;
100 108
101struct events_stats { 109struct events_stats {