diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2009-12-13 16:50:25 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-12-14 10:57:15 -0500 |
commit | 301a0b020210360c6e441c7765521248bc87d58e (patch) | |
tree | 5321a8ab67584d0aac0e3df9a749df1b4206460b /tools/perf/builtin-sched.c | |
parent | d8f66248d6f25f7c935cc5307c43bf394db07272 (diff) |
perf session: Ditch register_perf_file_handler
Pass the event_ops to perf_session__process_events instead.
Also move the event_ops definition to session.h, starting to
move things around to their right place, trimming the many
unneeded headers we have.
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Frédéric Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
LKML-Reference: <1260741029-4430-2-git-send-email-acme@infradead.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'tools/perf/builtin-sched.c')
-rw-r--r-- | tools/perf/builtin-sched.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/tools/perf/builtin-sched.c b/tools/perf/builtin-sched.c index 48ab283ed86b..b5b447236261 100644 --- a/tools/perf/builtin-sched.c +++ b/tools/perf/builtin-sched.c | |||
@@ -12,7 +12,6 @@ | |||
12 | #include "util/trace-event.h" | 12 | #include "util/trace-event.h" |
13 | 13 | ||
14 | #include "util/debug.h" | 14 | #include "util/debug.h" |
15 | #include "util/data_map.h" | ||
16 | 15 | ||
17 | #include <sys/prctl.h> | 16 | #include <sys/prctl.h> |
18 | 17 | ||
@@ -1656,7 +1655,7 @@ static int sample_type_check(u64 type) | |||
1656 | return 0; | 1655 | return 0; |
1657 | } | 1656 | } |
1658 | 1657 | ||
1659 | static struct perf_file_handler file_handler = { | 1658 | static struct perf_event_ops event_ops = { |
1660 | .process_sample_event = process_sample_event, | 1659 | .process_sample_event = process_sample_event, |
1661 | .process_comm_event = event__process_comm, | 1660 | .process_comm_event = event__process_comm, |
1662 | .process_lost_event = process_lost_event, | 1661 | .process_lost_event = process_lost_event, |
@@ -1672,9 +1671,9 @@ static int read_events(void) | |||
1672 | return -ENOMEM; | 1671 | return -ENOMEM; |
1673 | 1672 | ||
1674 | register_idle_thread(); | 1673 | register_idle_thread(); |
1675 | register_perf_file_handler(&file_handler); | ||
1676 | 1674 | ||
1677 | err = perf_session__process_events(session, 0, &event__cwdlen, &event__cwd); | 1675 | err = perf_session__process_events(session, &event_ops, 0, |
1676 | &event__cwdlen, &event__cwd); | ||
1678 | perf_session__delete(session); | 1677 | perf_session__delete(session); |
1679 | return err; | 1678 | return err; |
1680 | } | 1679 | } |