89ff1b551a7451e45ac7920d981ad5b5ce1a7453
[linux-3.10.git] / tools / perf / util / tool.h
1 #ifndef __PERF_TOOL_H
2 #define __PERF_TOOL_H
3
4 struct perf_session;
5 struct perf_evsel;
6 struct perf_tool;
7 struct machine;
8
9 typedef int (*event_sample)(struct perf_tool *tool, union perf_event *event,
10                             struct perf_sample *sample,
11                             struct perf_evsel *evsel, struct machine *machine);
12
13 typedef int (*event_op)(struct perf_tool *tool, union perf_event *event,
14                         struct perf_sample *sample, struct machine *machine);
15
16 typedef int (*event_attr_op)(union perf_event *event,
17                              struct perf_evlist **pevlist);
18 typedef int (*event_simple_op)(struct perf_tool *tool, union perf_event *event);
19
20 typedef int (*event_synth_op)(union perf_event *event,
21                               struct perf_session *session);
22
23 typedef int (*event_op2)(struct perf_tool *tool, union perf_event *event,
24                          struct perf_session *session);
25
26 struct perf_tool {
27         event_sample    sample,
28                         read;
29         event_op        mmap,
30                         comm,
31                         fork,
32                         exit,
33                         lost,
34                         throttle,
35                         unthrottle;
36         event_attr_op   attr;
37         event_synth_op  tracing_data;
38         event_simple_op event_type;
39         event_op2       finished_round,
40                         build_id;
41         bool            ordered_samples;
42         bool            ordering_requires_timestamps;
43 };
44
45 #endif /* __PERF_TOOL_H */