perf report: Do map lookups in resolve_callchain()
authorArnaldo Carvalho de Melo <[email protected]>
Sun, 22 Nov 2009 16:59:22 +0000 (14:59 -0200)
committerIngo Molnar <[email protected]>
Sun, 22 Nov 2009 17:54:24 +0000 (18:54 +0100)
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 <[email protected]>
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Cc: Frédéric Weisbecker <[email protected]>
Cc: Mike Galbraith <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Paul Mackerras <[email protected]>
LKML-Reference: <1258909162[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
tools/perf/builtin-report.c

index 0d39e805be2d2ea6fadf17fe10846c350ccc26d1..7e690f73b51619c9fcc62d084e5f426e5ac9227e 100644 (file)
@@ -467,7 +467,7 @@ static int call__match(struct symbol *sym)
        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 symbol **parent)
 {
@@ -496,10 +496,10 @@ static struct symbol **resolve_callchain(struct thread *thread, struct map *map,
                case PERF_CONTEXT_HV:
                        break;
                case PERF_CONTEXT_KERNEL:
-                       sym = kernel_maps__find_symbol(ip, &map, NULL);
+                       sym = kernel_maps__find_symbol(ip, NULL, NULL);
                        break;
                default:
-                       sym = resolve_symbol(thread, &map, &ip);
+                       sym = resolve_symbol(thread, NULL, &ip);
                        break;
                }
 
@@ -529,7 +529,7 @@ hist_entry__add(struct thread *thread, struct map *map,
        struct hist_entry *he;
 
        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,
                               ip, count, level, &hit);