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-report.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-report.c')
-rw-r--r-- | tools/perf/builtin-report.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c index dcd8fedc298c..c203eaf73a2f 100644 --- a/tools/perf/builtin-report.c +++ b/tools/perf/builtin-report.c | |||
@@ -27,7 +27,6 @@ | |||
27 | #include "util/parse-options.h" | 27 | #include "util/parse-options.h" |
28 | #include "util/parse-events.h" | 28 | #include "util/parse-events.h" |
29 | 29 | ||
30 | #include "util/data_map.h" | ||
31 | #include "util/thread.h" | 30 | #include "util/thread.h" |
32 | #include "util/sort.h" | 31 | #include "util/sort.h" |
33 | #include "util/hist.h" | 32 | #include "util/hist.h" |
@@ -748,7 +747,7 @@ static int sample_type_check(u64 type) | |||
748 | return 0; | 747 | return 0; |
749 | } | 748 | } |
750 | 749 | ||
751 | static struct perf_file_handler file_handler = { | 750 | static struct perf_event_ops event_ops = { |
752 | .process_sample_event = process_sample_event, | 751 | .process_sample_event = process_sample_event, |
753 | .process_mmap_event = event__process_mmap, | 752 | .process_mmap_event = event__process_mmap, |
754 | .process_comm_event = process_comm_event, | 753 | .process_comm_event = process_comm_event, |
@@ -776,9 +775,7 @@ static int __cmd_report(void) | |||
776 | if (show_threads) | 775 | if (show_threads) |
777 | perf_read_values_init(&show_threads_values); | 776 | perf_read_values_init(&show_threads_values); |
778 | 777 | ||
779 | register_perf_file_handler(&file_handler); | 778 | ret = perf_session__process_events(session, &event_ops, full_paths, |
780 | |||
781 | ret = perf_session__process_events(session, full_paths, | ||
782 | &event__cwdlen, &event__cwd); | 779 | &event__cwdlen, &event__cwd); |
783 | if (ret) | 780 | if (ret) |
784 | goto out_delete; | 781 | goto out_delete; |