summaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-kmem.c
diff options
context:
space:
mode:
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 @@
#include "util/trace-event.h"
#include "util/debug.h"
-#include "util/data_map.h"
#include <linux/rbtree.h>
@@ -359,7 +358,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_comm_event = event__process_comm,
.sample_type_check = sample_type_check,
@@ -374,9 +373,8 @@ static int read_events(void)
return -ENOMEM;
register_idle_thread();
- register_perf_file_handler(&file_handler);
-
- err = perf_session__process_events(session, 0, &event__cwdlen, &event__cwd);
+ err = perf_session__process_events(session, &event_ops, 0,
+ &event__cwdlen, &event__cwd);
perf_session__delete(session);
return err;
}