linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 0/3] Prefer evsel over evsel->core.idx
@ 2024-11-14 23:07 Ian Rogers
  2024-11-14 23:07 ` [PATCH v1 1/3] perf stream: Use evsel rather than evsel->idx Ian Rogers
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: Ian Rogers @ 2024-11-14 23:07 UTC (permalink / raw)
  To: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
	Namhyung Kim, Mark Rutland, Alexander Shishkin, Jiri Olsa,
	Ian Rogers, Adrian Hunter, Kan Liang, Andi Kleen,
	Ahelenia Ziemiańska, Chen Ni, linux-perf-users, linux-kernel

James Clark's patches fixing evsel->core.idx [1] reminded me that we
pass the int value around unnecessarily. Passing the evsel avoids
issues if the evlist is reordered but paired with sanitizers we can
also know when something is used when it shouldn't be. These patches
do some initial work reducing the use of evsel->core.idx or reducing
the API to pass evsels and not their interior index.

[1] https://lore.kernel.org/lkml/20241114160450.295844-2-james.clark@linaro.org/

Ian Rogers (3):
  perf stream: Use evsel rather than evsel->idx
  perf values: Use evsel rather than evsel->idx
  perf annotate: Prefer passing evsel to evsel->core.idx

 tools/perf/builtin-diff.c         |   4 +-
 tools/perf/builtin-report.c       |   4 +-
 tools/perf/builtin-top.c          |   4 +-
 tools/perf/ui/browsers/annotate.c |   2 +-
 tools/perf/util/annotate.c        |  32 +++++----
 tools/perf/util/annotate.h        |  20 +++---
 tools/perf/util/stream.c          |   7 +-
 tools/perf/util/stream.h          |  10 +--
 tools/perf/util/values.c          | 106 +++++++++++++-----------------
 tools/perf/util/values.h          |   9 +--
 10 files changed, 90 insertions(+), 108 deletions(-)

-- 
2.47.0.338.g60cca15819-goog


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2024-12-20 19:50 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-14 23:07 [PATCH v1 0/3] Prefer evsel over evsel->core.idx Ian Rogers
2024-11-14 23:07 ` [PATCH v1 1/3] perf stream: Use evsel rather than evsel->idx Ian Rogers
2024-11-14 23:07 ` [PATCH v1 2/3] perf values: " Ian Rogers
2024-11-14 23:07 ` [PATCH v1 3/3] perf annotate: Prefer passing evsel to evsel->core.idx Ian Rogers
2024-12-20 19:50   ` Arnaldo Carvalho de Melo
2024-11-18 10:18 ` [PATCH v1 0/3] Prefer evsel over evsel->core.idx James Clark
2024-12-14  0:13 ` Namhyung Kim
2024-12-20 18:57   ` Ian Rogers
2024-12-20 19:45     ` Arnaldo Carvalho de Melo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).