All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] perf unwind: Unwind with libdw doesn't take symfs into account
@ 2018-02-11 21:24 Martin Vuille
  2018-03-20  6:28 ` [tip:perf/core] " tip-bot for Martin Vuille
  0 siblings, 1 reply; 2+ messages in thread
From: Martin Vuille @ 2018-02-11 21:24 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo; +Cc: linux-perf-users, linux-kernel

Path passed to libdw for unwinding doesn't include symfs path
if specified, so unwinding fails because ELF file is not found.

Similar to unwinding with libunwind, pass symsrc_filename instead
of long_name. If there is no symsrc_filename, fallback to long_name.

Signed-off-by: Martin Vuille <jpmv27@aim.com>
---
 tools/perf/util/unwind-libdw.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/util/unwind-libdw.c b/tools/perf/util/unwind-libdw.c
index 967323c958fd..7bdd239c795c 100644
--- a/tools/perf/util/unwind-libdw.c
+++ b/tools/perf/util/unwind-libdw.c
@@ -50,7 +50,7 @@ static int __report_module(struct addr_location *al, u64 ip,
 
 	if (!mod)
 		mod = dwfl_report_elf(ui->dwfl, dso->short_name,
-				      dso->long_name, -1, al->map->start,
+				      (dso->symsrc_filename ? dso->symsrc_filename : dso->long_name), -1, al->map->start,
 				      false);
 
 	return mod && dwfl_addrmodule(ui->dwfl, ip) == mod ? 0 : -1;
-- 
2.13.6

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

* [tip:perf/core] perf unwind: Unwind with libdw doesn't take symfs into account
  2018-02-11 21:24 [PATCH] perf unwind: Unwind with libdw doesn't take symfs into account Martin Vuille
@ 2018-03-20  6:28 ` tip-bot for Martin Vuille
  0 siblings, 0 replies; 2+ messages in thread
From: tip-bot for Martin Vuille @ 2018-03-20  6:28 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: namhyung, adrian.hunter, jpmv27, linux-kernel, acme, jolsa,
	wangnan0, tglx, dsahern, hpa, mingo

Commit-ID:  3d20c6246690219881786de10d2dda93f616d0ac
Gitweb:     https://git.kernel.org/tip/3d20c6246690219881786de10d2dda93f616d0ac
Author:     Martin Vuille <jpmv27@aim.com>
AuthorDate: Sun, 11 Feb 2018 16:24:20 -0500
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Fri, 16 Mar 2018 13:55:51 -0300

perf unwind: Unwind with libdw doesn't take symfs into account

Path passed to libdw for unwinding doesn't include symfs path
if specified, so unwinding fails because ELF file is not found.

Similar to unwinding with libunwind, pass symsrc_filename instead
of long_name. If there is no symsrc_filename, fallback to long_name.

Signed-off-by: Martin Vuille <jpmv27@aim.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/r/20180211212420.18388-1-jpmv27@aim.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/unwind-libdw.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/util/unwind-libdw.c b/tools/perf/util/unwind-libdw.c
index 1e9c974faf67..8e969f28cc59 100644
--- a/tools/perf/util/unwind-libdw.c
+++ b/tools/perf/util/unwind-libdw.c
@@ -50,7 +50,7 @@ static int __report_module(struct addr_location *al, u64 ip,
 
 	if (!mod)
 		mod = dwfl_report_elf(ui->dwfl, dso->short_name,
-				      dso->long_name, -1, al->map->start,
+				      (dso->symsrc_filename ? dso->symsrc_filename : dso->long_name), -1, al->map->start,
 				      false);
 
 	return mod && dwfl_addrmodule(ui->dwfl, ip) == mod ? 0 : -1;

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

end of thread, other threads:[~2018-03-20  6:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-11 21:24 [PATCH] perf unwind: Unwind with libdw doesn't take symfs into account Martin Vuille
2018-03-20  6:28 ` [tip:perf/core] " tip-bot for Martin Vuille

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.