Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1259346
| From | tip-bot for Rabin Vincent <tipbot@zytor.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [tip:perf/core] perf unwind: Pass symbol source to libunwind |
| Date | 2015-10-30 10:20 +0100 |
| Message-ID | <qpe0P-3Z0-27@gated-at.bofh.it> (permalink) |
| References | <qoQhQ-5NH-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Commit-ID: 7ed4915ad60788d6b846e2cd034f49ee15698143 Gitweb: http://git.kernel.org/tip/7ed4915ad60788d6b846e2cd034f49ee15698143 Author: Rabin Vincent <rabin.vincent@axis.com> AuthorDate: Thu, 29 Oct 2015 08:49:36 +0100 Committer: Arnaldo Carvalho de Melo <acme@redhat.com> CommitDate: Thu, 29 Oct 2015 17:48:38 -0300 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> --- tools/perf/util/unwind-libunwind.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/perf/util/unwind-libunwind.c b/tools/perf/util/unwind-libunwind.c index f729f9e..c83832b 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); -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCHv2 1/3] perf: unwind: pass symbol source to libunwind Rabin Vincent <rabin.vincent@axis.com> - 2015-10-29 09:00 +0100
[PATCHv2 3/3] perf: add helper makefile for cross compiling libs Rabin Vincent <rabin.vincent@axis.com> - 2015-10-29 09:00 +0100
Re: [PATCHv2 3/3] perf: add helper makefile for cross compiling libs Ingo Molnar <mingo@kernel.org> - 2015-10-29 10:50 +0100
[PATCHv2 2/3] tools: build: fix libiberty feature detection Rabin Vincent <rabin.vincent@axis.com> - 2015-10-29 09:00 +0100
Re: [PATCHv2 2/3] tools: build: fix libiberty feature detection Jiri Olsa <jolsa@redhat.com> - 2015-10-29 21:50 +0100
[tip:perf/core] tools build: Fix libiberty feature detection tip-bot for Rabin Vincent <tipbot@zytor.com> - 2015-10-30 10:20 +0100
[tip:perf/core] perf unwind: Pass symbol source to libunwind tip-bot for Rabin Vincent <tipbot@zytor.com> - 2015-10-30 10:20 +0100
csiph-web