aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/tool.h
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/util/tool.h')
-rw-r--r--tools/perf/util/tool.h45
1 files changed, 45 insertions, 0 deletions
diff --git a/tools/perf/util/tool.h b/tools/perf/util/tool.h
new file mode 100644
index 000000000000..89ff1b551a74
--- /dev/null
+++ b/tools/perf/util/tool.h
@@ -0,0 +1,45 @@
1#ifndef __PERF_TOOL_H
2#define __PERF_TOOL_H
3
4struct perf_session;
5struct perf_evsel;
6struct perf_tool;
7struct machine;
8
9typedef 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
13typedef int (*event_op)(struct perf_tool *tool, union perf_event *event,
14 struct perf_sample *sample, struct machine *machine);
15
16typedef int (*event_attr_op)(union perf_event *event,
17 struct perf_evlist **pevlist);
18typedef int (*event_simple_op)(struct perf_tool *tool, union perf_event *event);
19
20typedef int (*event_synth_op)(union perf_event *event,
21 struct perf_session *session);
22
23typedef int (*event_op2)(struct perf_tool *tool, union perf_event *event,
24 struct perf_session *session);
25
26struct 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 */