Skip to content

Commit 5f06267

Browse files
vwaxnamhyung
authored andcommitted
perf: unwind: Fix symfs with libdw
Pass the full path including the symfs (if any) to libdw. Without this unwinding fails with errors like this when a symfs is used: unwind: failed with 'No such file or directory'" Signed-off-by: Vincent Whitchurch <vincent.whitchurch@axis.com> Acked-by: Namhyung Kim <namhyung@kernel.org> Cc: Mark Rutland <mark.rutland@arm.com> Cc: kernel@axis.com Cc: Ian Rogers <irogers@google.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Arnaldo Carvalho de Melo <acme@kernel.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Ingo Molnar <mingo@redhat.com> Link: https://lore.kernel.org/r/20230630-perf-libdw-symfs-v2-1-469760dd4d5b@axis.com Signed-off-by: Namhyung Kim <namhyung@kernel.org>
1 parent 78a175c commit 5f06267

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

tools/perf/util/unwind-libdw.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,13 @@ static int __report_module(struct addr_location *al, u64 ip,
6666
mod = 0;
6767
}
6868

69-
if (!mod)
70-
mod = dwfl_report_elf(ui->dwfl, dso->short_name, dso->long_name, -1,
69+
if (!mod) {
70+
char filename[PATH_MAX];
71+
72+
__symbol__join_symfs(filename, sizeof(filename), dso->long_name);
73+
mod = dwfl_report_elf(ui->dwfl, dso->short_name, filename, -1,
7174
map__start(al->map) - map__pgoff(al->map), false);
75+
}
7276
if (!mod) {
7377
char filename[PATH_MAX];
7478

0 commit comments

Comments
 (0)