summaryrefslogtreecommitdiffstats
path: root/tools/perf
diff options
context:
space:
mode:
authorRabin Vincent <rabin.vincent@axis.com>2015-10-29 08:49:36 +0100
committerArnaldo Carvalho de Melo <acme@redhat.com>2015-10-29 17:48:38 -0300
commit7ed4915ad60788d6b846e2cd034f49ee15698143 (patch)
tree81cc1a59203c393286dba3e76daa343f5c35b127 /tools/perf
parent3af6ed84eb43c587beb5f3252222e39e65d08c61 (diff)
downloadlinux-7ed4915ad60788d6b846e2cd034f49ee15698143.tar.bz2
perf unwind: Pass symbol source to libunwind
Even if --symfs is used to point to the debug binaries, we send in the non-debug filenames to libunwind, which leads to libunwind not finding the debug frame. Fix this by preferring the file in --symfs, if it is available. Signed-off-by: Rabin Vincent <rabin.vincent@axis.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Rabin Vincent <rabinv@axis.com> Link: http://lkml.kernel.org/r/1446104978-26429-1-git-send-email-rabin.vincent@axis.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf')
-rw-r--r--tools/perf/util/unwind-libunwind.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/perf/util/unwind-libunwind.c b/tools/perf/util/unwind-libunwind.c
index f729f9e99f99..c83832b555e5 100644
--- a/tools/perf/util/unwind-libunwind.c
+++ b/tools/perf/util/unwind-libunwind.c
@@ -360,12 +360,15 @@ find_proc_info(unw_addr_space_t as, unw_word_t ip, unw_proc_info_t *pi,
int fd = dso__data_get_fd(map->dso, ui->machine);
int is_exec = elf_is_exec(fd, map->dso->name);
unw_word_t base = is_exec ? 0 : map->start;
+ const char *symfile;
if (fd >= 0)
dso__data_put_fd(map->dso);
+ symfile = map->dso->symsrc_filename ?: map->dso->name;
+
memset(&di, 0, sizeof(di));
- if (dwarf_find_debug_frame(0, &di, ip, base, map->dso->name,
+ if (dwarf_find_debug_frame(0, &di, ip, base, symfile,
map->start, map->end))
return dwarf_search_unwind_table(as, ip, &di, pi,
need_unwind_info, arg);