summaryrefslogtreecommitdiff
path: root/tools/perf/ui/browsers/annotate.c
diff options
context:
space:
mode:
authorNamhyung Kim <namhyung@kernel.org>2025-08-15 20:16:34 -0700
committerArnaldo Carvalho de Melo <acme@redhat.com>2025-08-28 12:35:42 -0300
commit53a61a6ca279165dd51f4e3bb5f8b11544915138 (patch)
tree02609b017a1dfdd8547feafdee3ef7643e2c135d /tools/perf/ui/browsers/annotate.c
parentd69f56545ed53342204136b66b4d10ba80103d14 (diff)
perf annotate: Add dso__debuginfo() helper
It'd be great if it can get the correct debug information using DSO build-Id not just the path name. Instead of adding new callsites of debuginfo__new(), let's add dso__debuginfo() which can hide the access using the pathname and help the future conversion. Suggested-by: Ian Rogers <irogers@google.com> Signed-off-by: Namhyung Kim <namhyung@kernel.org> Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Peter Zijlstra <peterz@infradead.org> Link: https://lore.kernel.org/r/20250816031635.25318-12-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/ui/browsers/annotate.c')
-rw-r--r--tools/perf/ui/browsers/annotate.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/perf/ui/browsers/annotate.c b/tools/perf/ui/browsers/annotate.c
index e3e7004f3225..9aa3c1ba22f5 100644
--- a/tools/perf/ui/browsers/annotate.c
+++ b/tools/perf/ui/browsers/annotate.c
@@ -1050,7 +1050,7 @@ show_sup_ins:
case 'T':
annotate_opts.code_with_type ^= 1;
if (browser->dbg == NULL)
- browser->dbg = debuginfo__new(dso__long_name(map__dso(ms->map)));
+ browser->dbg = dso__debuginfo(map__dso(ms->map));
annotate_browser__show(&browser->b, title, help);
annotate_browser__debuginfo_warning(browser);
continue;
@@ -1146,7 +1146,7 @@ int __hist_entry__tui_annotate(struct hist_entry *he, struct map_symbol *ms,
ui_helpline__push("Press ESC to exit");
if (annotate_opts.code_with_type)
- browser.dbg = debuginfo__new(dso__long_name(dso));
+ browser.dbg = dso__debuginfo(dso);
browser.b.width = notes->src->widths.max_line_len;
browser.b.nr_entries = notes->src->nr_entries;