Frederic Weisbecker | 016e92f | 2009-10-07 12:47:31 +0200 | [diff] [blame] | 1 | #ifndef __PERF_DATAMAP_H |
| 2 | #define __PERF_DATAMAP_H |
| 3 | |
| 4 | #include "event.h" |
| 5 | #include "header.h" |
Arnaldo Carvalho de Melo | 94c744b | 2009-12-11 21:24:02 -0200 | [diff] [blame] | 6 | #include "session.h" |
Frederic Weisbecker | 016e92f | 2009-10-07 12:47:31 +0200 | [diff] [blame] | 7 | |
Arnaldo Carvalho de Melo | 62daacb | 2009-11-27 16:29:22 -0200 | [diff] [blame] | 8 | typedef int (*event_type_handler_t)(event_t *); |
Frederic Weisbecker | 016e92f | 2009-10-07 12:47:31 +0200 | [diff] [blame] | 9 | |
| 10 | struct perf_file_handler { |
| 11 | event_type_handler_t process_sample_event; |
| 12 | event_type_handler_t process_mmap_event; |
| 13 | event_type_handler_t process_comm_event; |
| 14 | event_type_handler_t process_fork_event; |
| 15 | event_type_handler_t process_exit_event; |
| 16 | event_type_handler_t process_lost_event; |
| 17 | event_type_handler_t process_read_event; |
| 18 | event_type_handler_t process_throttle_event; |
| 19 | event_type_handler_t process_unthrottle_event; |
| 20 | int (*sample_type_check)(u64 sample_type); |
| 21 | unsigned long total_unknown; |
| 22 | }; |
| 23 | |
| 24 | void register_perf_file_handler(struct perf_file_handler *handler); |
Arnaldo Carvalho de Melo | 94c744b | 2009-12-11 21:24:02 -0200 | [diff] [blame] | 25 | int perf_session__process_events(struct perf_session *self, |
| 26 | int full_paths, int *cwdlen, char **cwd); |
Arnaldo Carvalho de Melo | 716d69e | 2009-12-09 20:09:38 -0200 | [diff] [blame] | 27 | int perf_header__read_build_ids(int input, u64 offset, u64 file_size); |
Frederic Weisbecker | 016e92f | 2009-10-07 12:47:31 +0200 | [diff] [blame] | 28 | |
| 29 | #endif |