All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCHv2 1/3] perf: unwind: pass symbol source to libunwind
@ 2015-10-29  7:49 Rabin Vincent
  2015-10-29  7:49 ` [PATCHv2 2/3] tools: build: fix libiberty feature detection Rabin Vincent
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Rabin Vincent @ 2015-10-29  7:49 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo
  Cc: jolsa, namhyung, Ingo Molnar, Peter Zijlstra, linux-kernel,
	Rabin Vincent

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>
---
v2: fall back to ->name if ->symsrc_filename is NULL

 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);
-- 
1.7.10.4


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2015-11-27 11:36 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-29  7:49 [PATCHv2 1/3] perf: unwind: pass symbol source to libunwind Rabin Vincent
2015-10-29  7:49 ` [PATCHv2 2/3] tools: build: fix libiberty feature detection Rabin Vincent
2015-10-29 20:45   ` Jiri Olsa
2015-10-30  9:14   ` [tip:perf/core] tools build: Fix " tip-bot for Rabin Vincent
2015-10-29  7:49 ` [PATCHv2 3/3] perf: add helper makefile for cross compiling libs Rabin Vincent
2015-10-29  9:46   ` Ingo Molnar
2015-11-06  8:09     ` Rabin Vincent
2015-11-27 11:35       ` Ingo Molnar
2015-10-30  9:15 ` [tip:perf/core] perf unwind: Pass symbol source to libunwind tip-bot for Rabin Vincent

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.