Skip to content

Commit

Permalink
perf kmem: Do not ignore mmap events
Browse files Browse the repository at this point in the history
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
e727ca7 ("perf kmem: Resolve kernel symbols again").

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung.kim@lge.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1406872771-23933-1-git-send-email-namhyung@kernel.org
[ Fixed up merge conflict with Jiri's ordered_events rename patch set ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
  • Loading branch information
Namhyung Kim authored and Arnaldo Carvalho de Melo committed Aug 12, 2014
1 parent 63914ac commit 64c4090
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions tools/perf/builtin-kmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -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_events = true,
};

Expand Down Expand Up @@ -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;

Expand Down

0 comments on commit 64c4090

Please sign in to comment.