blob: 98c5b823388cd3efe8c84582433230ce273b73c5 [file] [log] [blame]
Frederic Weisbecker016e92f2009-10-07 12:47:31 +02001#ifndef __PERF_DATAMAP_H
2#define __PERF_DATAMAP_H
3
4#include "event.h"
5#include "header.h"
Arnaldo Carvalho de Melo94c744b2009-12-11 21:24:02 -02006#include "session.h"
Frederic Weisbecker016e92f2009-10-07 12:47:31 +02007
Arnaldo Carvalho de Melo62daacb2009-11-27 16:29:22 -02008typedef int (*event_type_handler_t)(event_t *);
Frederic Weisbecker016e92f2009-10-07 12:47:31 +02009
10struct 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
24void register_perf_file_handler(struct perf_file_handler *handler);
Arnaldo Carvalho de Melo94c744b2009-12-11 21:24:02 -020025int perf_session__process_events(struct perf_session *self,
26 int full_paths, int *cwdlen, char **cwd);
Arnaldo Carvalho de Melo716d69e2009-12-09 20:09:38 -020027int perf_header__read_build_ids(int input, u64 offset, u64 file_size);
Frederic Weisbecker016e92f2009-10-07 12:47:31 +020028
29#endif