perf unwind: Fix separate debug info files when using elfutils' libdw's unwinder
authorJan Kratochvil <jan.kratochvil@redhat.com>
Fri, 4 Dec 2020 12:17:02 +0000 (09:17 -0300)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 17 Dec 2020 17:36:16 +0000 (14:36 -0300)
commitbf53fc6b5f415cddc7118091cb8fd6a211b2320d
treef4547562c01c6f155abf40c26996cffcf1acafab
parent2eb5dd418034ecea2f7031e3d33f2991a878b148
perf unwind: Fix separate debug info files when using elfutils' libdw's unwinder

elfutils needs to be provided main binary and separate debug info file
respectively. Providing separate debug info file instead of the main
binary is not sufficient.

One needs to try both supplied filename and its possible cache by its
build-id depending on the use case.

Signed-off-by: Jan Kratochvil <jan.kratochvil@redhat.com>
Tested-by: Jiri Olsa <jolsa@redhat.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/unwind-libdw.c