aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-kmem.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2009-12-13 16:50:25 -0500
committerIngo Molnar <mingo@elte.hu>2009-12-14 10:57:15 -0500
commit301a0b020210360c6e441c7765521248bc87d58e (patch)
tree5321a8ab67584d0aac0e3df9a749df1b4206460b /tools/perf/builtin-kmem.c
parentd8f66248d6f25f7c935cc5307c43bf394db07272 (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-kmem.c')
-rw-r--r--tools/perf/builtin-kmem.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/tools/perf/builtin-kmem.c b/tools/perf/builtin-kmem.c
index 101b2682b4df..6f74bd8d20e6 100644
--- a/tools/perf/builtin-kmem.c
+++ b/tools/perf/builtin-kmem.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 <linux/rbtree.h> 16#include <linux/rbtree.h>
18 17
@@ -359,7 +358,7 @@ static int sample_type_check(u64 type)
359 return 0; 358 return 0;
360} 359}
361 360
362static struct perf_file_handler file_handler = { 361static struct perf_event_ops event_ops = {
363 .process_sample_event = process_sample_event, 362 .process_sample_event = process_sample_event,
364 .process_comm_event = event__process_comm, 363 .process_comm_event = event__process_comm,
365 .sample_type_check = sample_type_check, 364 .sample_type_check = sample_type_check,
@@ -374,9 +373,8 @@ static int read_events(void)
374 return -ENOMEM; 373 return -ENOMEM;
375 374
376 register_idle_thread(); 375 register_idle_thread();
377 register_perf_file_handler(&file_handler); 376 err = perf_session__process_events(session, &event_ops, 0,
378 377 &event__cwdlen, &event__cwd);
379 err = perf_session__process_events(session, 0, &event__cwdlen, &event__cwd);
380 perf_session__delete(session); 378 perf_session__delete(session);
381 return err; 379 return err;
382} 380}