Skip to content

Commit

Permalink
perf unwind: Unwind with libdw doesn't take symfs into account
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Martin Vuille authored and Arnaldo Carvalho de Melo committed Mar 16, 2018
1 parent a8685f0 commit 3d20c62
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/perf/util/unwind-libdw.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 3d20c62

Please sign in to comment.