summaryrefslogtreecommitdiff
path: root/tools/perf/builtin-diff.c
diff options
context:
space:
mode:
authorIan Rogers <irogers@google.com>2024-11-14 15:07:11 -0800
committerArnaldo Carvalho de Melo <acme@redhat.com>2024-12-23 13:53:08 -0300
commit2f0539fa02672e4a703e0d4205f40caa0a141d22 (patch)
tree883f06c08c63865d7651ee8397380a87605d3bb6 /tools/perf/builtin-diff.c
parent518413d89ce498d35f6cb7104dd8c32f6e87a9aa (diff)
perf stream: Use evsel rather than evsel->idx
An evsel idx may not be stable due to sorting, evlist removal, etc. Avoid use of the idx where the evsel itself can be used to avoid these problems. Reviewed-by: James Clark <james.clark@linaro.org> Reviewed-by: Namhyung Kim <namhyung@kernel.org> Signed-off-by: Ian Rogers <irogers@google.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Ahelenia ZiemiaƄska <nabijaczleweli@nabijaczleweli.xyz> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: Chen Ni <nichen@iscas.ac.cn> Cc: Ingo Molnar <mingo@redhat.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Peter Zijlstra <peterz@infradead.org> Link: https://lore.kernel.org/r/20241114230713.330701-2-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/builtin-diff.c')
-rw-r--r--tools/perf/builtin-diff.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/perf/builtin-diff.c b/tools/perf/builtin-diff.c
index 196969538e58..ae490d58af92 100644
--- a/tools/perf/builtin-diff.c
+++ b/tools/perf/builtin-diff.c
@@ -1020,12 +1020,12 @@ static int process_base_stream(struct data__file *data_base,
continue;
es_base = evsel_streams__entry(data_base->evlist_streams,
- evsel_base->core.idx);
+ evsel_base);
if (!es_base)
return -1;
es_pair = evsel_streams__entry(data_pair->evlist_streams,
- evsel_pair->core.idx);
+ evsel_pair);
if (!es_pair)
return -1;