[patch 2/5] perf_counter: Synthesize VDSO mmap event

From: Anton Blanchard
Date: Thu Jul 16 2009 - 06:54:51 EST


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@xxxxxxxxx>
---

Only tested on PowerPC, but I assume x86 has the same issue.

Index: linux.trees.git/tools/perf/builtin-record.c
===================================================================
--- linux.trees.git.orig/tools/perf/builtin-record.c 2009-07-13 12:33:49.000000000 +1000
+++ linux.trees.git/tools/perf/builtin-record.c 2009-07-13 13:25:00.000000000 +1000
@@ -313,6 +313,10 @@
if (*pbf == 'x') { /* vm_exec */
char *execname = strchr(bf, '/');

+ /* Catch VDSO */
+ if (execname == NULL)
+ execname = strstr(bf, "[vdso]");
+
if (execname == NULL)
continue;


--

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/