]> git.ipfire.org Git - thirdparty/linux.git/commit
perf tools: Get debug info of DSO properly
authorNamhyung Kim <namhyung@kernel.org>
Tue, 13 Jan 2026 23:37:57 +0000 (15:37 -0800)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Tue, 20 Jan 2026 20:20:51 +0000 (17:20 -0300)
commit069e603d8248dac98b1ef2909e2f1c4169b9da11
treeea33ec90adbe55a3a9a0e9beba7e02c1b2544406
parentb42c4dfe02af407d04375f070f56a818ed4c92ce
perf tools: Get debug info of DSO properly

The dso__debuginfo() just used the path name to open the file but it may
be outdated.  It should check build-ID and use the file in the build-ID
cache if available rather than just using the path name.

Let's factor out dso__get_filename() to avoid code duplicate.

Fixes: 53a61a6ca279165d ("perf annotate: Add dso__debuginfo() helper")
Reviewed-by: Ian Rogers <irogers@google.com>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: James Clark <james.clark@linaro.org>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/dso.c
tools/perf/util/dso.h