diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2011-01-29 11:01:45 -0500 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2011-01-29 13:25:37 -0500 |
commit | 8115d60c323dd9931b95221c0a392aeddc1d6ef3 (patch) | |
tree | 13e75d71c5163c78efc9d8ab33988cc6c7be74a1 /tools/perf/util/event.h | |
parent | 8d50e5b4171a69cf48ca94a1e7c14033d0b4771d (diff) |
perf tools: Kill event_t typedef, use 'union perf_event' instead
And move the event_t methods to the perf_event__ too.
No code changes, just namespace consistency.
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Tom Zanussi <tzanussi@gmail.com>
LKML-Reference: <new-submission>
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 | 69 |
1 files changed, 36 insertions, 33 deletions
diff --git a/tools/perf/util/event.h b/tools/perf/util/event.h index 84fd71ffd619..eecb42273d59 100644 --- a/tools/perf/util/event.h +++ b/tools/perf/util/event.h | |||
@@ -117,7 +117,7 @@ struct tracing_data_event { | |||
117 | u32 size; | 117 | u32 size; |
118 | }; | 118 | }; |
119 | 119 | ||
120 | typedef union event_union { | 120 | union perf_event { |
121 | struct perf_event_header header; | 121 | struct perf_event_header header; |
122 | struct ip_event ip; | 122 | struct ip_event ip; |
123 | struct mmap_event mmap; | 123 | struct mmap_event mmap; |
@@ -130,49 +130,52 @@ typedef union event_union { | |||
130 | struct event_type_event event_type; | 130 | struct event_type_event event_type; |
131 | struct tracing_data_event tracing_data; | 131 | struct tracing_data_event tracing_data; |
132 | struct build_id_event build_id; | 132 | struct build_id_event build_id; |
133 | } event_t; | 133 | }; |
134 | 134 | ||
135 | void event__print_totals(void); | 135 | void perf_event__print_totals(void); |
136 | 136 | ||
137 | struct perf_session; | 137 | struct perf_session; |
138 | 138 | ||
139 | typedef int (*event__handler_synth_t)(event_t *event, | 139 | typedef int (*perf_event__handler_synth_t)(union perf_event *event, |
140 | struct perf_session *session); | ||
141 | typedef int (*perf_event__handler_t)(union perf_event *event, | ||
142 | struct perf_sample *sample, | ||
140 | struct perf_session *session); | 143 | struct perf_session *session); |
141 | typedef int (*event__handler_t)(event_t *event, struct perf_sample *sample, | ||
142 | struct perf_session *session); | ||
143 | 144 | ||
144 | int event__synthesize_thread(pid_t pid, event__handler_t process, | 145 | int perf_event__synthesize_thread(pid_t pid, perf_event__handler_t process, |
146 | struct perf_session *session); | ||
147 | int perf_event__synthesize_threads(perf_event__handler_t process, | ||
148 | struct perf_session *session); | ||
149 | int perf_event__synthesize_kernel_mmap(perf_event__handler_t process, | ||
150 | struct perf_session *session, | ||
151 | struct machine *machine, | ||
152 | const char *symbol_name); | ||
153 | |||
154 | int perf_event__synthesize_modules(perf_event__handler_t process, | ||
155 | struct perf_session *session, | ||
156 | struct machine *machine); | ||
157 | |||
158 | int perf_event__process_comm(union perf_event *event, struct perf_sample *sample, | ||
145 | struct perf_session *session); | 159 | struct perf_session *session); |
146 | int event__synthesize_threads(event__handler_t process, | 160 | int perf_event__process_lost(union perf_event *event, struct perf_sample *sample, |
147 | struct perf_session *session); | 161 | struct perf_session *session); |
148 | int event__synthesize_kernel_mmap(event__handler_t process, | 162 | int perf_event__process_mmap(union perf_event *event, struct perf_sample *sample, |
149 | struct perf_session *session, | 163 | struct perf_session *session); |
150 | struct machine *machine, | 164 | int perf_event__process_task(union perf_event *event, struct perf_sample *sample, |
151 | const char *symbol_name); | 165 | struct perf_session *session); |
152 | 166 | int perf_event__process(union perf_event *event, struct perf_sample *sample, | |
153 | int event__synthesize_modules(event__handler_t process, | ||
154 | struct perf_session *session, | ||
155 | struct machine *machine); | ||
156 | |||
157 | int event__process_comm(event_t *event, struct perf_sample *sample, | ||
158 | struct perf_session *session); | ||
159 | int event__process_lost(event_t *event, struct perf_sample *sample, | ||
160 | struct perf_session *session); | ||
161 | int event__process_mmap(event_t *event, struct perf_sample *sample, | ||
162 | struct perf_session *session); | ||
163 | int event__process_task(event_t *event, struct perf_sample *sample, | ||
164 | struct perf_session *session); | 167 | struct perf_session *session); |
165 | int event__process(event_t *event, struct perf_sample *sample, | ||
166 | struct perf_session *session); | ||
167 | 168 | ||
168 | struct addr_location; | 169 | struct addr_location; |
169 | int event__preprocess_sample(const event_t *self, struct perf_session *session, | 170 | int perf_event__preprocess_sample(const union perf_event *self, |
170 | struct addr_location *al, struct perf_sample *sample, | 171 | struct perf_session *session, |
171 | symbol_filter_t filter); | 172 | struct addr_location *al, |
173 | struct perf_sample *sample, | ||
174 | symbol_filter_t filter); | ||
172 | 175 | ||
173 | const char *event__get_event_name(unsigned int id); | 176 | const char *perf_event__name(unsigned int id); |
174 | 177 | ||
175 | int event__parse_sample(const event_t *event, u64 type, bool sample_id_all, | 178 | int perf_event__parse_sample(const union perf_event *event, u64 type, |
176 | struct perf_sample *sample); | 179 | bool sample_id_all, struct perf_sample *sample); |
177 | 180 | ||
178 | #endif /* __PERF_RECORD_H */ | 181 | #endif /* __PERF_RECORD_H */ |