blob: 3f0d21b3819ea67e027c8ac5f597e9d8f82307a2 [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"
6
7typedef int (*event_type_handler_t)(event_t *, unsigned long, unsigned long);
8
9struct perf_file_handler {
10 event_type_handler_t process_sample_event;
11 event_type_handler_t process_mmap_event;
12 event_type_handler_t process_comm_event;
13 event_type_handler_t process_fork_event;
14 event_type_handler_t process_exit_event;
15 event_type_handler_t process_lost_event;
16 event_type_handler_t process_read_event;
17 event_type_handler_t process_throttle_event;
18 event_type_handler_t process_unthrottle_event;
19 int (*sample_type_check)(u64 sample_type);
20 unsigned long total_unknown;
21};
22
23void register_perf_file_handler(struct perf_file_handler *handler);
24int mmap_dispatch_perf_file(struct perf_header **pheader,
25 const char *input_name,
Arnaldo Carvalho de Melocc612d82009-11-23 16:39:10 -020026 const char *vmlinux_name,
27 bool try_vmlinux_path,
Frederic Weisbecker016e92f2009-10-07 12:47:31 +020028 int force,
29 int full_paths,
30 int *cwdlen,
31 char **cwd);
Arnaldo Carvalho de Melo84fe8482009-11-16 16:32:41 -020032int perf_header__read_build_ids(int input, off_t offset, off_t file_size);
Frederic Weisbecker016e92f2009-10-07 12:47:31 +020033
34#endif