diff options
Diffstat (limited to 'tools/perf/builtin-kmem.c')
-rw-r--r-- | tools/perf/builtin-kmem.c | 8 |
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 | ||
362 | static struct perf_file_handler file_handler = { | 361 | static 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 | } |