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 <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Namhyung Kim <namhyung@gmail.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/r/1381747424-3557-8-git-send-email-adrian.hunter@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
Adrian Hunter
2013-10-14 13:43:44 +03:00
committed by Arnaldo Carvalho de Melo
parent fc1b691d76
commit 1d5077bdd9
3 changed files with 38 additions and 3 deletions

View File

@@ -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;
}