aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/event.h
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2011-01-29 11:01:45 -0500
committerArnaldo Carvalho de Melo <acme@redhat.com>2011-01-29 13:25:37 -0500
commit8115d60c323dd9931b95221c0a392aeddc1d6ef3 (patch)
tree13e75d71c5163c78efc9d8ab33988cc6c7be74a1 /tools/perf/util/event.h
parent8d50e5b4171a69cf48ca94a1e7c14033d0b4771d (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.h69
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
120typedef union event_union { 120union 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
135void event__print_totals(void); 135void perf_event__print_totals(void);
136 136
137struct perf_session; 137struct perf_session;
138 138
139typedef int (*event__handler_synth_t)(event_t *event, 139typedef int (*perf_event__handler_synth_t)(union perf_event *event,
140 struct perf_session *session);
141typedef int (*perf_event__handler_t)(union perf_event *event,
142 struct perf_sample *sample,
140 struct perf_session *session); 143 struct perf_session *session);
141typedef int (*event__handler_t)(event_t *event, struct perf_sample *sample,
142 struct perf_session *session);
143 144
144int event__synthesize_thread(pid_t pid, event__handler_t process, 145int perf_event__synthesize_thread(pid_t pid, perf_event__handler_t process,
146 struct perf_session *session);
147int perf_event__synthesize_threads(perf_event__handler_t process,
148 struct perf_session *session);
149int 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
154int perf_event__synthesize_modules(perf_event__handler_t process,
155 struct perf_session *session,
156 struct machine *machine);
157
158int perf_event__process_comm(union perf_event *event, struct perf_sample *sample,
145 struct perf_session *session); 159 struct perf_session *session);
146int event__synthesize_threads(event__handler_t process, 160int perf_event__process_lost(union perf_event *event, struct perf_sample *sample,
147 struct perf_session *session); 161 struct perf_session *session);
148int event__synthesize_kernel_mmap(event__handler_t process, 162int 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, 164int perf_event__process_task(union perf_event *event, struct perf_sample *sample,
151 const char *symbol_name); 165 struct perf_session *session);
152 166int perf_event__process(union perf_event *event, struct perf_sample *sample,
153int event__synthesize_modules(event__handler_t process,
154 struct perf_session *session,
155 struct machine *machine);
156
157int event__process_comm(event_t *event, struct perf_sample *sample,
158 struct perf_session *session);
159int event__process_lost(event_t *event, struct perf_sample *sample,
160 struct perf_session *session);
161int event__process_mmap(event_t *event, struct perf_sample *sample,
162 struct perf_session *session);
163int event__process_task(event_t *event, struct perf_sample *sample,
164 struct perf_session *session); 167 struct perf_session *session);
165int event__process(event_t *event, struct perf_sample *sample,
166 struct perf_session *session);
167 168
168struct addr_location; 169struct addr_location;
169int event__preprocess_sample(const event_t *self, struct perf_session *session, 170int 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
173const char *event__get_event_name(unsigned int id); 176const char *perf_event__name(unsigned int id);
174 177
175int event__parse_sample(const event_t *event, u64 type, bool sample_id_all, 178int 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 */