aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/ui/browsers/annotate.c
diff options
context:
space:
mode:
authorIan Rogers <[email protected]>2025-01-17 18:18:48 +0000
committerNamhyung Kim <[email protected]>2025-01-18 18:02:10 +0000
commit035f0c279bcfc07314240de273d90f4061aef04d (patch)
tree28ff6090c9d777f129609c70ab4c9b3ca018f6fc /tools/perf/ui/browsers/annotate.c
parentperf lock: Rename fields in lock_type_table (diff)
downloadkernel-035f0c279bcfc07314240de273d90f4061aef04d.tar.gz
kernel-035f0c279bcfc07314240de273d90f4061aef04d.zip
perf annotate: Prefer passing evsel to evsel->core.idx
An evsel idx may not be stable due to sorting, evlist removal, etc. Try to reduce it being part of APIs by explicitly passing the evsel in annotate code. Internally the code just reads evsel->core.idx so behavior is unchanged. Signed-off-by: Ian Rogers <[email protected]> Cc: Chen Ni <[email protected]> Cc: Athira Rajeev <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Namhyung Kim <[email protected]>
Diffstat (limited to 'tools/perf/ui/browsers/annotate.c')
-rw-r--r--tools/perf/ui/browsers/annotate.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/ui/browsers/annotate.c b/tools/perf/ui/browsers/annotate.c
index d7e727345dab..135d6ce88fb3 100644
--- a/tools/perf/ui/browsers/annotate.c
+++ b/tools/perf/ui/browsers/annotate.c
@@ -754,7 +754,7 @@ static int annotate_browser__run(struct annotate_browser *browser,
hbt->timer(hbt->arg);
if (delay_secs != 0) {
- symbol__annotate_decay_histogram(sym, evsel->core.idx);
+ symbol__annotate_decay_histogram(sym, evsel);
hists__scnprintf_title(hists, title, sizeof(title));
annotate_browser__show(&browser->b, title, help);
}