aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/builtin-report.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2009-11-22 11:59:22 -0500
committerIngo Molnar <mingo@elte.hu>2009-11-22 12:54:24 -0500
commit50e5095afa8c2be0f35e5c0e21d5f7912340e8f2 (patch)
treee7cbb2c9ab76d4bbaec7af36c849865f9cc34c6b /tools/perf/builtin-report.c
parent87f8ea4cd3680ef7f4da4391aed97abb25eae333 (diff)
perf report: Do map lookups in resolve_callchain()
Bug introduced in 439d473b4777de510e1322168ac6f2f377ecd5bc, 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: 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: <1258909162-28496-1-git-send-email-acme@infradead.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'tools/perf/builtin-report.c')
-rw-r--r--tools/perf/builtin-report.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/perf/builtin-report.c b/tools/perf/builtin-report.c
index 0d39e805be2d..7e690f73b516 100644
--- a/tools/perf/builtin-report.c
+++ b/tools/perf/builtin-report.c
@@ -467,7 +467,7 @@ static int call__match(struct symbol *sym)
467 return 0; 467 return 0;
468} 468}
469 469
470static struct symbol **resolve_callchain(struct thread *thread, struct map *map, 470static struct symbol **resolve_callchain(struct thread *thread,
471 struct ip_callchain *chain, 471 struct ip_callchain *chain,
472 struct symbol **parent) 472 struct symbol **parent)
473{ 473{
@@ -496,10 +496,10 @@ static struct symbol **resolve_callchain(struct thread *thread, struct map *map,
496 case PERF_CONTEXT_HV: 496 case PERF_CONTEXT_HV:
497 break; 497 break;
498 case PERF_CONTEXT_KERNEL: 498 case PERF_CONTEXT_KERNEL:
499 sym = kernel_maps__find_symbol(ip, &map, NULL); 499 sym = kernel_maps__find_symbol(ip, NULL, NULL);
500 break; 500 break;
501 default: 501 default:
502 sym = resolve_symbol(thread, &map, &ip); 502 sym = resolve_symbol(thread, NULL, &ip);
503 break; 503 break;
504 } 504 }
505 505
@@ -529,7 +529,7 @@ hist_entry__add(struct thread *thread, struct map *map,
529 struct hist_entry *he; 529 struct hist_entry *he;
530 530
531 if ((sort__has_parent || callchain) && chain) 531 if ((sort__has_parent || callchain) && chain)
532 syms = resolve_callchain(thread, map, chain, &parent); 532 syms = resolve_callchain(thread, chain, &parent);
533 533
534 he = __hist_entry__add(thread, map, sym, parent, 534 he = __hist_entry__add(thread, map, sym, parent,
535 ip, count, level, &hit); 535 ip, count, level, &hit);