diff options
| author | Ian Rogers <[email protected]> | 2024-11-14 23:07:11 +0000 |
|---|---|---|
| committer | Arnaldo Carvalho de Melo <[email protected]> | 2024-12-23 16:53:08 +0000 |
| commit | 2f0539fa02672e4a703e0d4205f40caa0a141d22 (patch) | |
| tree | 883f06c08c63865d7651ee8397380a87605d3bb6 /tools/perf/builtin-diff.c | |
| parent | perf Documentation: Describe the PMU naming convention (diff) | |
| download | kernel-2f0539fa02672e4a703e0d4205f40caa0a141d22.tar.gz kernel-2f0539fa02672e4a703e0d4205f40caa0a141d22.zip | |
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 <[email protected]>
Reviewed-by: Namhyung Kim <[email protected]>
Signed-off-by: Ian Rogers <[email protected]>
Cc: Adrian Hunter <[email protected]>
Cc: Ahelenia ZiemiaĆska <[email protected]>
Cc: Alexander Shishkin <[email protected]>
Cc: Andi Kleen <[email protected]>
Cc: Chen Ni <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Jiri Olsa <[email protected]>
Cc: Kan Liang <[email protected]>
Cc: Mark Rutland <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Diffstat (limited to 'tools/perf/builtin-diff.c')
| -rw-r--r-- | tools/perf/builtin-diff.c | 4 |
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; |
