perf symbols: Synthesize anonymous mmap events
authorAnton Blanchard <anton@samba.org>
Mon, 29 Aug 2011 23:15:06 +0000 (09:15 +1000)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Fri, 23 Sep 2011 17:37:06 +0000 (14:37 -0300)
commit6a0e55d85babfccfd976703852ec8bab388b3a10
tree965a6075c05d2600c50508b1dba4a0a7c5606614
parent764e16a30a77a9c8346fbae6615e7c818ce9d00f
perf symbols: Synthesize anonymous mmap events

perf_event__synthesize_mmap_events does not create anonymous mmap events
even though the kernel does. As a result an already running application
with dynamically created code will not get profiled - all samples end up
in the unknown bucket.

This patch skips any entries with '[' in the name to avoid adding events
for special regions (eg the vsyscall page). All other executable mmaps
are assumed to be anonymous and an event is synthesized.

Acked-by: Pekka Enberg <penberg@kernel.org>
Cc: Eric B Munson <emunson@mgebm.net>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Pekka Enberg <penberg@cs.helsinki.fi>
Link: http://lkml.kernel.org/r/20110830091506.60b51fe8@kryten
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/event.c