diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2010-02-20 16:53:13 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2010-02-21 11:48:24 -0500 |
commit | 10fe12ef631a7e85022ed26304a37f033a6a95b8 (patch) | |
tree | 1317aa1a7a293df85158005299adcde107736cb4 /tools/perf/util/event.c | |
parent | f7e7ee36757f68778700cde1aaed89e1d23e59fd (diff) |
perf symbols: Fix up map end too on modular kernels with no modules installed
In 2161db9 we stopped failing when not finding modules when
asked too, but then the kernel maps (just one, for vmlinux)
wasn't having its ->end field correctly set up, so symbols were
not being found for the vmlinux map because its range was 0-0.
Reported-by: Ingo Molnar <mingo@elte.hu>
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: <1266702793-29434-1-git-send-email-acme@infradead.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'tools/perf/util/event.c')
-rw-r--r-- | tools/perf/util/event.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/perf/util/event.c b/tools/perf/util/event.c index c3831f633dec..9eb7005bc6d6 100644 --- a/tools/perf/util/event.c +++ b/tools/perf/util/event.c | |||
@@ -379,6 +379,12 @@ int event__process_mmap(event_t *self, struct perf_session *session) | |||
379 | 379 | ||
380 | session->vmlinux_maps[MAP__FUNCTION]->start = self->mmap.start; | 380 | session->vmlinux_maps[MAP__FUNCTION]->start = self->mmap.start; |
381 | session->vmlinux_maps[MAP__FUNCTION]->end = self->mmap.start + self->mmap.len; | 381 | session->vmlinux_maps[MAP__FUNCTION]->end = self->mmap.start + self->mmap.len; |
382 | /* | ||
383 | * Be a bit paranoid here, some perf.data file came with | ||
384 | * a zero sized synthesized MMAP event for the kernel. | ||
385 | */ | ||
386 | if (session->vmlinux_maps[MAP__FUNCTION]->end == 0) | ||
387 | session->vmlinux_maps[MAP__FUNCTION]->end = ~0UL; | ||
382 | 388 | ||
383 | perf_session__set_kallsyms_ref_reloc_sym(session, symbol_name, | 389 | perf_session__set_kallsyms_ref_reloc_sym(session, symbol_name, |
384 | self->mmap.pgoff); | 390 | self->mmap.pgoff); |