Commit 50e5095a authored by Arnaldo Carvalho de Melo's avatar Arnaldo Carvalho de Melo Committed by Ingo Molnar

perf report: Do map lookups in resolve_callchain()

Bug introduced in 439d473b,
making the initial map be used for all IPs, so that symbols
outside this initial map would either be erroneously resolved or
not resolve at all.
Reported-by: default avatarIngo Molnar <mingo@elte.hu>
Signed-off-by: default avatarArnaldo 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: <1258909162-28496-1-git-send-email-acme@infradead.org>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 87f8ea4c
...@@ -467,7 +467,7 @@ static int call__match(struct symbol *sym) ...@@ -467,7 +467,7 @@ static int call__match(struct symbol *sym)
return 0; return 0;
} }
static struct symbol **resolve_callchain(struct thread *thread, struct map *map, static struct symbol **resolve_callchain(struct thread *thread,
struct ip_callchain *chain, struct ip_callchain *chain,
struct symbol **parent) struct symbol **parent)
{ {
...@@ -496,10 +496,10 @@ static struct symbol **resolve_callchain(struct thread *thread, struct map *map, ...@@ -496,10 +496,10 @@ static struct symbol **resolve_callchain(struct thread *thread, struct map *map,
case PERF_CONTEXT_HV: case PERF_CONTEXT_HV:
break; break;
case PERF_CONTEXT_KERNEL: case PERF_CONTEXT_KERNEL:
sym = kernel_maps__find_symbol(ip, &map, NULL); sym = kernel_maps__find_symbol(ip, NULL, NULL);
break; break;
default: default:
sym = resolve_symbol(thread, &map, &ip); sym = resolve_symbol(thread, NULL, &ip);
break; break;
} }
...@@ -529,7 +529,7 @@ hist_entry__add(struct thread *thread, struct map *map, ...@@ -529,7 +529,7 @@ hist_entry__add(struct thread *thread, struct map *map,
struct hist_entry *he; struct hist_entry *he;
if ((sort__has_parent || callchain) && chain) if ((sort__has_parent || callchain) && chain)
syms = resolve_callchain(thread, map, chain, &parent); syms = resolve_callchain(thread, chain, &parent);
he = __hist_entry__add(thread, map, sym, parent, he = __hist_entry__add(thread, map, sym, parent,
ip, count, level, &hit); ip, count, level, &hit);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment