aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/ui/browsers/annotate.c
diff options
context:
space:
mode:
authorAdrian Hunter <[email protected]>2013-10-14 10:43:44 +0000
committerArnaldo Carvalho de Melo <[email protected]>2013-10-14 15:21:18 +0000
commit1d5077bdd9a10c4297cded139989bb9ee2998a6c (patch)
tree2d072c0a31e42cdeba837f85058f39b5b034f06c /tools/perf/ui/browsers/annotate.c
parentperf buildid-cache: Add ability to add kcore to the cache (diff)
downloadkernel-1d5077bdd9a10c4297cded139989bb9ee2998a6c.tar.gz
kernel-1d5077bdd9a10c4297cded139989bb9ee2998a6c.zip
perf annotate: Another fix for annotate_browser__callq()
The target address is provided by objdump and is not necessary a memory address. Add a helper to get the correct address. Signed-off-by: Adrian Hunter <[email protected]> Cc: David Ahern <[email protected]> Cc: Frederic Weisbecker <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Mike Galbraith <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Paul Mackerras <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Stephane Eranian <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Diffstat (limited to 'tools/perf/ui/browsers/annotate.c')
-rw-r--r--tools/perf/ui/browsers/annotate.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/tools/perf/ui/browsers/annotate.c b/tools/perf/ui/browsers/annotate.c
index 57d3a8659fc0..f0697a3aede0 100644
--- a/tools/perf/ui/browsers/annotate.c
+++ b/tools/perf/ui/browsers/annotate.c
@@ -445,14 +445,17 @@ static bool annotate_browser__callq(struct annotate_browser *browser,
struct annotation *notes;
struct addr_map_symbol target = {
.map = ms->map,
- .addr = dl->ops.target.addr,
+ .addr = map__objdump_2mem(ms->map, dl->ops.target.addr),
};
char title[SYM_TITLE_MAX_SIZE];
if (!ins__is_call(dl->ins))
return false;
- if (map_groups__find_ams(&target, NULL)) {
+ if (map_groups__find_ams(&target, NULL) ||
+ map__rip_2objdump(target.map, target.map->map_ip(target.map,
+ target.addr)) !=
+ dl->ops.target.addr) {
ui_helpline__puts("The called function was not found.");
return true;
}