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 <[email protected]> Acked-by: Namhyung Kim <[email protected]> Cc: Mark Rutland <[email protected]> Cc: [email protected] Cc: Ian Rogers <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Adrian Hunter <[email protected]> Cc: Arnaldo Carvalho de Melo <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Alexander Shishkin <[email protected]> Cc: Ingo Molnar <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Namhyung Kim <[email protected]>
1 parent 78a175c commit 5f06267

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

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)