diff options
Diffstat (limited to 'tools/perf/util/event.h')
-rw-r--r-- | tools/perf/util/event.h | 68 |
1 files changed, 44 insertions, 24 deletions
diff --git a/tools/perf/util/event.h b/tools/perf/util/event.h index 357a85b85248..cbdeaad9c5e5 100644 --- a/tools/perf/util/event.h +++ b/tools/perf/util/event.h | |||
@@ -2,6 +2,7 @@ | |||
2 | #define __PERF_RECORD_H | 2 | #define __PERF_RECORD_H |
3 | 3 | ||
4 | #include <limits.h> | 4 | #include <limits.h> |
5 | #include <stdio.h> | ||
5 | 6 | ||
6 | #include "../perf.h" | 7 | #include "../perf.h" |
7 | #include "map.h" | 8 | #include "map.h" |
@@ -141,43 +142,54 @@ union perf_event { | |||
141 | 142 | ||
142 | void perf_event__print_totals(void); | 143 | void perf_event__print_totals(void); |
143 | 144 | ||
144 | struct perf_session; | 145 | struct perf_tool; |
145 | struct thread_map; | 146 | struct thread_map; |
146 | 147 | ||
147 | typedef int (*perf_event__handler_synth_t)(union perf_event *event, | 148 | typedef int (*perf_event__handler_t)(struct perf_tool *tool, |
148 | struct perf_session *session); | 149 | union perf_event *event, |
149 | typedef int (*perf_event__handler_t)(union perf_event *event, | ||
150 | struct perf_sample *sample, | 150 | struct perf_sample *sample, |
151 | struct perf_session *session); | 151 | struct machine *machine); |
152 | 152 | ||
153 | int perf_event__synthesize_thread_map(struct thread_map *threads, | 153 | int perf_event__synthesize_thread_map(struct perf_tool *tool, |
154 | struct thread_map *threads, | ||
154 | perf_event__handler_t process, | 155 | perf_event__handler_t process, |
155 | struct perf_session *session); | 156 | struct machine *machine); |
156 | int perf_event__synthesize_threads(perf_event__handler_t process, | 157 | int perf_event__synthesize_threads(struct perf_tool *tool, |
157 | struct perf_session *session); | 158 | perf_event__handler_t process, |
158 | int perf_event__synthesize_kernel_mmap(perf_event__handler_t process, | 159 | struct machine *machine); |
159 | struct perf_session *session, | 160 | int perf_event__synthesize_kernel_mmap(struct perf_tool *tool, |
161 | perf_event__handler_t process, | ||
160 | struct machine *machine, | 162 | struct machine *machine, |
161 | const char *symbol_name); | 163 | const char *symbol_name); |
162 | 164 | ||
163 | int perf_event__synthesize_modules(perf_event__handler_t process, | 165 | int perf_event__synthesize_modules(struct perf_tool *tool, |
164 | struct perf_session *session, | 166 | perf_event__handler_t process, |
165 | struct machine *machine); | 167 | struct machine *machine); |
166 | 168 | ||
167 | int perf_event__process_comm(union perf_event *event, struct perf_sample *sample, | 169 | int perf_event__process_comm(struct perf_tool *tool, |
168 | struct perf_session *session); | 170 | union perf_event *event, |
169 | int perf_event__process_lost(union perf_event *event, struct perf_sample *sample, | 171 | struct perf_sample *sample, |
170 | struct perf_session *session); | 172 | struct machine *machine); |
171 | int perf_event__process_mmap(union perf_event *event, struct perf_sample *sample, | 173 | int perf_event__process_lost(struct perf_tool *tool, |
172 | struct perf_session *session); | 174 | union perf_event *event, |
173 | int perf_event__process_task(union perf_event *event, struct perf_sample *sample, | 175 | struct perf_sample *sample, |
174 | struct perf_session *session); | 176 | struct machine *machine); |
175 | int perf_event__process(union perf_event *event, struct perf_sample *sample, | 177 | int perf_event__process_mmap(struct perf_tool *tool, |
176 | struct perf_session *session); | 178 | union perf_event *event, |
179 | struct perf_sample *sample, | ||
180 | struct machine *machine); | ||
181 | int perf_event__process_task(struct perf_tool *tool, | ||
182 | union perf_event *event, | ||
183 | struct perf_sample *sample, | ||
184 | struct machine *machine); | ||
185 | int perf_event__process(struct perf_tool *tool, | ||
186 | union perf_event *event, | ||
187 | struct perf_sample *sample, | ||
188 | struct machine *machine); | ||
177 | 189 | ||
178 | struct addr_location; | 190 | struct addr_location; |
179 | int perf_event__preprocess_sample(const union perf_event *self, | 191 | int perf_event__preprocess_sample(const union perf_event *self, |
180 | struct perf_session *session, | 192 | struct machine *machine, |
181 | struct addr_location *al, | 193 | struct addr_location *al, |
182 | struct perf_sample *sample, | 194 | struct perf_sample *sample, |
183 | symbol_filter_t filter); | 195 | symbol_filter_t filter); |
@@ -187,5 +199,13 @@ const char *perf_event__name(unsigned int id); | |||
187 | int perf_event__parse_sample(const union perf_event *event, u64 type, | 199 | int perf_event__parse_sample(const union perf_event *event, u64 type, |
188 | int sample_size, bool sample_id_all, | 200 | int sample_size, bool sample_id_all, |
189 | struct perf_sample *sample, bool swapped); | 201 | struct perf_sample *sample, bool swapped); |
202 | int perf_event__synthesize_sample(union perf_event *event, u64 type, | ||
203 | const struct perf_sample *sample, | ||
204 | bool swapped); | ||
205 | |||
206 | size_t perf_event__fprintf_comm(union perf_event *event, FILE *fp); | ||
207 | size_t perf_event__fprintf_mmap(union perf_event *event, FILE *fp); | ||
208 | size_t perf_event__fprintf_task(union perf_event *event, FILE *fp); | ||
209 | size_t perf_event__fprintf(union perf_event *event, FILE *fp); | ||
190 | 210 | ||
191 | #endif /* __PERF_RECORD_H */ | 211 | #endif /* __PERF_RECORD_H */ |