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>
This commit is contained in:
Arnaldo Carvalho de Melo
2011-11-28 08:30:20 -02:00
parent 743eb86865
commit 45694aa770
22 changed files with 301 additions and 277 deletions

45
tools/perf/util/tool.h Normal file
View File

@@ -0,0 +1,45 @@
#ifndef __PERF_TOOL_H
#define __PERF_TOOL_H
struct perf_session;
struct perf_evsel;
struct perf_tool;
struct machine;
typedef int (*event_sample)(struct perf_tool *tool, union perf_event *event,
struct perf_sample *sample,
struct perf_evsel *evsel, struct machine *machine);
typedef int (*event_op)(struct perf_tool *tool, union perf_event *event,
struct perf_sample *sample, struct machine *machine);
typedef int (*event_attr_op)(union perf_event *event,
struct perf_evlist **pevlist);
typedef int (*event_simple_op)(struct perf_tool *tool, union perf_event *event);
typedef int (*event_synth_op)(union perf_event *event,
struct perf_session *session);
typedef int (*event_op2)(struct perf_tool *tool, union perf_event *event,
struct perf_session *session);
struct perf_tool {
event_sample sample,
read;
event_op mmap,
comm,
fork,
exit,
lost,
throttle,
unthrottle;
event_attr_op attr;
event_synth_op tracing_data;
event_simple_op event_type;
event_op2 finished_round,
build_id;
bool ordered_samples;
bool ordering_requires_timestamps;
};
#endif /* __PERF_TOOL_H */