[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1381221956-16699-6-git-send-email-adrian.hunter@intel.com>
Date: Tue, 8 Oct 2013 11:45:52 +0300
From: Adrian Hunter <adrian.hunter@...el.com>
To: Arnaldo Carvalho de Melo <acme@...stprotocols.net>
Cc: Peter Zijlstra <a.p.zijlstra@...llo.nl>,
linux-kernel@...r.kernel.org, David Ahern <dsahern@...il.com>,
Frederic Weisbecker <fweisbec@...il.com>,
Jiri Olsa <jolsa@...hat.com>, Mike Galbraith <efault@....de>,
Namhyung Kim <namhyung@...il.com>,
Paul Mackerras <paulus@...ba.org>,
Stephane Eranian <eranian@...gle.com>
Subject: [PATCH V5 5/9] perf tools: fix annotate_browser__callq()
When following a call, annotate_browser__callq()
uses the current symbol's map to look up the
target ip. That will not work if the target ip
is on a map with a different mapping (i.e.
start - pgoff is different).
Signed-off-by: Adrian Hunter <adrian.hunter@...el.com>
---
tools/perf/ui/browsers/annotate.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/tools/perf/ui/browsers/annotate.c b/tools/perf/ui/browsers/annotate.c
index 08545ae..d9edb35 100644
--- a/tools/perf/ui/browsers/annotate.c
+++ b/tools/perf/ui/browsers/annotate.c
@@ -445,14 +445,16 @@ static bool annotate_browser__callq(struct annotate_browser *browser,
struct symbol *sym = ms->sym;
struct annotation *notes;
struct symbol *target;
+ struct map *map;
u64 ip;
char title[SYM_TITLE_MAX_SIZE];
if (!ins__is_call(dl->ins))
return false;
- ip = ms->map->map_ip(ms->map, dl->ops.target.addr);
- target = map__find_symbol(ms->map, ip, NULL);
+ map = ms->map;
+ ip = dl->ops.target.addr;
+ target = map__find_other_map_symbol(&map, &ip, NULL);
if (target == NULL) {
ui_helpline__puts("The called function was not found.");
return true;
@@ -469,8 +471,8 @@ static bool annotate_browser__callq(struct annotate_browser *browser,
}
pthread_mutex_unlock(¬es->lock);
- symbol__tui_annotate(target, ms->map, evsel, hbt);
- sym_title(sym, ms->map, title, sizeof(title));
+ symbol__tui_annotate(target, map, evsel, hbt);
+ sym_title(sym, map, title, sizeof(title));
ui_browser__show_title(&browser->b, title);
return true;
}
--
1.7.11.7
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists