summaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-kmem.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2010-01-13 13:22:17 -0200
committerIngo Molnar <mingo@elte.hu>2010-01-13 17:39:43 +0100
commitb7cece76783c68fb391f9882235b4b0c9c300c46 (patch)
tree8a0224493acc3cf74c218384a3b76b3e47c131a2 /tools/perf/builtin-kmem.c
parentff314d3903c2843de65c2148f66f277f2440ed26 (diff)
downloadop-kernel-dev-b7cece76783c68fb391f9882235b4b0c9c300c46.zip
op-kernel-dev-b7cece76783c68fb391f9882235b4b0c9c300c46.tar.gz
perf tools: Encode kernel module mappings in perf.data
We were always looking at the running machine /proc/modules, even when processing a perf.data file, which only makes sense when we're doing 'perf record' and 'perf report' on the same machine, and in close sucession, or if we don't use modules at all, right Peter? ;-) Now, at 'perf record' time we read /proc/modules, find the long path for modules, and put them as PERF_MMAP events, just like we did to encode the reloc reference symbol for vmlinux. Talking about that now it is encoded in .pgoff, so that we can use .{start,len} to store the address boundaries for the kernel so that when we reconstruct the kmaps tree we can do lookups right away, without having to fixup the end of the kernel maps like we did in the past (and now only in perf record). One more step in the 'perf archive' direction when we'll finally be able to collect data in one machine and analyse in another. 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: <1263396139-4798-1-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.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/perf/builtin-kmem.c b/tools/perf/builtin-kmem.c
index 88c570c..4af7199 100644
--- a/tools/perf/builtin-kmem.c
+++ b/tools/perf/builtin-kmem.c
@@ -494,6 +494,11 @@ static int __cmd_kmem(void)
if (!perf_session__has_traces(session, "kmem record"))
goto out_delete;
+ if (perf_session__create_kernel_maps(session) < 0) {
+ pr_err("Problems creating kernel maps\n");
+ return -1;
+ }
+
setup_pager();
err = perf_session__process_events(session, &event_ops);
if (err != 0)
OpenPOWER on IntegriCloud