]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
perf_counter: Synthesize VDSO mmap event
authorAnton Blanchard <anton@samba.org>
Thu, 16 Jul 2009 13:44:29 +0000 (15:44 +0200)
committerIngo Molnar <mingo@elte.hu>
Sat, 18 Jul 2009 09:21:30 +0000 (11:21 +0200)
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>
tools/perf/builtin-record.c

index 4ef78a5e6f326bf7aa08cc10715403b86574a5fe..072aaf0369f88cff9ef931b22f8fbcd5aa653b2f 100644 (file)
@@ -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;