]> www.infradead.org Git - users/jedix/linux-maple.git/commit
perf annotate: Prefer passing evsel to evsel->core.idx
authorIan Rogers <irogers@google.com>
Fri, 17 Jan 2025 18:18:48 +0000 (10:18 -0800)
committerNamhyung Kim <namhyung@kernel.org>
Sat, 18 Jan 2025 18:02:10 +0000 (10:02 -0800)
commit035f0c279bcfc07314240de273d90f4061aef04d
tree28ff6090c9d777f129609c70ab4c9b3ca018f6fc
parentac22d75377a04ceca53a8d438440e82bf4c722fc
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 <irogers@google.com>
Cc: Chen Ni <nichen@iscas.ac.cn>
Cc: Athira Rajeev <atrajeev@linux.vnet.ibm.com>
Link: https://lore.kernel.org/r/20250117181848.690474-1-irogers@google.com
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
tools/perf/builtin-top.c
tools/perf/ui/browsers/annotate.c
tools/perf/ui/gtk/annotate.c
tools/perf/util/annotate.c
tools/perf/util/annotate.h