lkml.org 
[lkml]   [2014]   [Aug]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] perf kmem: Do not ignore mmap events
Date
The perf kmem command didn't process mmap events for some unknown
reason and it instead gets symbol info from a running kernel. This is
problematic if perf kmem record was run on a different kernel.

This patch adds the mmap event handlers and reverts the commit
e727ca73f85d ("perf kmem: Resolve kernel symbols again").

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
---
tools/perf/builtin-kmem.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/tools/perf/builtin-kmem.c b/tools/perf/builtin-kmem.c
index bef3376bfaf3..baaaab52f94b 100644
--- a/tools/perf/builtin-kmem.c
+++ b/tools/perf/builtin-kmem.c
@@ -256,6 +256,8 @@ static int process_sample_event(struct perf_tool *tool __maybe_unused,
static struct perf_tool perf_kmem = {
.sample = process_sample_event,
.comm = perf_event__process_comm,
+ .mmap = perf_event__process_mmap,
+ .mmap2 = perf_event__process_mmap2,
.ordered_samples = true,
};

@@ -424,9 +426,6 @@ static int __cmd_kmem(void)
if (session == NULL)
return -ENOMEM;

- if (perf_session__create_kernel_maps(session) < 0)
- goto out_delete;
-
if (!perf_session__has_traces(session, "kmem record"))
goto out_delete;

--
2.0.0


\
 
 \ /
  Last update: 2014-08-01 08:41    [W:0.051 / U:0.092 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site