aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/builtin-sched.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2011-11-28 08:30:20 -0200
committerArnaldo Carvalho de Melo <acme@redhat.com>2011-11-28 10:39:28 -0200
commit45694aa7702bc44d538a3bcb51bb2bb96cf190c0 (patch)
tree81bc1f449f55984556d89b63c461dcf181dc97e5 /tools/perf/builtin-sched.c
parent743eb868657bdb1b26c7b24077ca21c67c82c777 (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/builtin-sched.c')
-rw-r--r--tools/perf/builtin-sched.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/tools/perf/builtin-sched.c b/tools/perf/builtin-sched.c
index 6a771f822e5..0ee868e6f63 100644
--- a/tools/perf/builtin-sched.c
+++ b/tools/perf/builtin-sched.c
@@ -8,6 +8,7 @@
#include "util/thread.h"
#include "util/header.h"
#include "util/session.h"
+#include "util/tool.h"
#include "util/parse-options.h"
#include "util/trace-event.h"
@@ -1602,7 +1603,7 @@ static void process_raw_event(union perf_event *raw_event __used,
process_sched_migrate_task_event(data, machine, event, cpu, timestamp, thread);
}
-static int process_sample_event(struct perf_event_ops *ops __used,
+static int process_sample_event(struct perf_tool *tool __used,
union perf_event *event,
struct perf_sample *sample,
struct perf_evsel *evsel,
@@ -1631,7 +1632,7 @@ static int process_sample_event(struct perf_event_ops *ops __used,
return 0;
}
-static struct perf_event_ops event_ops = {
+static struct perf_tool perf_sched = {
.sample = process_sample_event,
.comm = perf_event__process_comm,
.lost = perf_event__process_lost,
@@ -1643,12 +1644,12 @@ static void read_events(bool destroy, struct perf_session **psession)
{
int err = -EINVAL;
struct perf_session *session = perf_session__new(input_name, O_RDONLY,
- 0, false, &event_ops);
+ 0, false, &perf_sched);
if (session == NULL)
die("No Memory");
if (perf_session__has_traces(session, "record -R")) {
- err = perf_session__process_events(session, &event_ops);
+ err = perf_session__process_events(session, &perf_sched);
if (err)
die("Failed to process events, error %d", err);