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>
This commit is contained in:
Arnaldo Carvalho de Melo
2009-12-13 19:50:25 -02:00
committed by Ingo Molnar
parent d8f66248d6
commit 301a0b0202
13 changed files with 66 additions and 89 deletions

View File

@@ -27,7 +27,6 @@
#include "util/parse-options.h"
#include "util/parse-events.h"
#include "util/data_map.h"
#include "util/thread.h"
#include "util/sort.h"
#include "util/hist.h"
@@ -748,7 +747,7 @@ static int sample_type_check(u64 type)
return 0;
}
static struct perf_file_handler file_handler = {
static struct perf_event_ops event_ops = {
.process_sample_event = process_sample_event,
.process_mmap_event = event__process_mmap,
.process_comm_event = process_comm_event,
@@ -776,9 +775,7 @@ static int __cmd_report(void)
if (show_threads)
perf_read_values_init(&show_threads_values);
register_perf_file_handler(&file_handler);
ret = perf_session__process_events(session, full_paths,
ret = perf_session__process_events(session, &event_ops, full_paths,
&event__cwdlen, &event__cwd);
if (ret)
goto out_delete;