diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2011-11-28 05:30:20 -0500 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2011-11-28 07:39:28 -0500 |
commit | 45694aa7702bc44d538a3bcb51bb2bb96cf190c0 (patch) | |
tree | 81bc1f449f55984556d89b63c461dcf181dc97e5 /tools/perf/util/tool.h | |
parent | 743eb868657bdb1b26c7b24077ca21c67c82c777 (diff) |
perf tools: Rename perf_event_ops to perf_tool
To better reflect that it became the base class for all tools, that must
be in each tool struct and where common stuff will be put.
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-qgpc4msetqlwr8y2k7537cxe@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/tool.h')
-rw-r--r-- | tools/perf/util/tool.h | 45 |
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 | |||
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 */ | ||