[PATCH v1 0/3] Prefer evsel over evsel->core.idx

Ian Rogers posted 3 patches 1 year, 2 months ago
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(-)
[PATCH v1 0/3] Prefer evsel over evsel->core.idx
Posted by Ian Rogers 1 year, 2 months ago
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
Re: [PATCH v1 0/3] Prefer evsel over evsel->core.idx
Posted by Namhyung Kim 1 year, 1 month ago
On Thu, Nov 14, 2024 at 03:07:10PM -0800, Ian Rogers wrote:
> 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

Reviewed-by: Namhyung Kim <namhyung@kernel.org>

Thanks,
Namhyung

> 
>  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
>
Re: [PATCH v1 0/3] Prefer evsel over evsel->core.idx
Posted by Ian Rogers 1 year, 1 month ago
On Fri, Dec 13, 2024 at 4:13 PM Namhyung Kim <namhyung@kernel.org> wrote:
>
> On Thu, Nov 14, 2024 at 03:07:10PM -0800, Ian Rogers wrote:
> > 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

Ping.

Reviewed-by: Namhyung Kim <namhyung@kernel.org>
Reviewed-by: James Clark <james.clark@linaro.org>

Thanks,
Ian
Re: [PATCH v1 0/3] Prefer evsel over evsel->core.idx
Posted by Arnaldo Carvalho de Melo 1 year, 1 month ago
On Fri, Dec 20, 2024 at 10:57:58AM -0800, Ian Rogers wrote:
> On Fri, Dec 13, 2024 at 4:13 PM Namhyung Kim <namhyung@kernel.org> wrote:
> >
> > On Thu, Nov 14, 2024 at 03:07:10PM -0800, Ian Rogers wrote:
> > > 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
> 
> Ping.
> 
> Reviewed-by: Namhyung Kim <namhyung@kernel.org>
> Reviewed-by: James Clark <james.clark@linaro.org>

Thanks, applied to perf-tools-next,

- Arnaldo
Re: [PATCH v1 0/3] Prefer evsel over evsel->core.idx
Posted by James Clark 1 year, 2 months ago

On 14/11/2024 11:07 pm, Ian Rogers wrote:
> 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(-)
> 

Reviewed-by: James Clark <james.clark@linaro.org>