summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Blanchard <anton@samba.org>2009-07-16 15:44:29 +0200
committerIngo Molnar <mingo@elte.hu>2009-07-18 11:21:30 +0200
commit11b5f81e1b0ea0bc84fe32f0a27054e052b2bf84 (patch)
tree709942202e3f5f345a66b162cd627bc1bf97dad9
parentperf_counter: Make sure we dont leak kernel memory to userspace (diff)
downloadlinux-11b5f81e1b0ea0bc84fe32f0a27054e052b2bf84.tar.xz
linux-11b5f81e1b0ea0bc84fe32f0a27054e052b2bf84.zip
perf_counter: Synthesize VDSO mmap event
perf record synthesizes mmap events for the running process. Right now it just catches file mappings, but we can check for the vdso symbol and add that too. Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl> LKML-Reference: <20090716104817.517264409@samba.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r--tools/perf/builtin-record.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index 4ef78a5e6f32..072aaf0369f8 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -313,6 +313,10 @@ static void pid_synthesize_mmap_samples(pid_t pid)
if (*pbf == 'x') { /* vm_exec */
char *execname = strchr(bf, '/');
+ /* Catch VDSO */
+ if (execname == NULL)
+ execname = strstr(bf, "[vdso]");
+
if (execname == NULL)
continue;