[PATCH v2 0/4] Hybrid event parsing fixes

Ian Rogers posted 4 patches 2 years, 8 months ago
tools/perf/tests/parse-events.c | 1108 ++++++++++++++++---------------
tools/perf/util/evsel.c         |    1 +
tools/perf/util/parse-events.c  |  104 ++-
tools/perf/util/parse-events.y  |   10 +-
tools/perf/util/pmu.c           |   18 +-
tools/perf/util/pmu.h           |    5 +
tools/perf/util/pmus.c          |    5 +
tools/perf/util/pmus.h          |    1 +
8 files changed, 698 insertions(+), 554 deletions(-)
[PATCH v2 0/4] Hybrid event parsing fixes
Posted by Ian Rogers 2 years, 8 months ago
Correct various issues that have come up in mailing list discussions,
the most impactful of which is the wildcard opening of events of type
PERF_TYPE_HARDWARE and PERF_TYPE_HW_CACHE. But also try to avoid a
parse-error without a warning, have more fall-back behaviors and be
liberal with the definition of software events.

The majority of the change is in correcting the parse-event test to
match the new hybrid parsing.

Ian Rogers (4):
  perf pmu: Correct perf_pmu__auto_merge_stats affecting hybrid
  perf evsel: Add verbose 3 print of evsel name when opening
  perf parse-events: Wildcard most "numeric" events
  perf test: Update parse-events expectations

 tools/perf/tests/parse-events.c | 1108 ++++++++++++++++---------------
 tools/perf/util/evsel.c         |    1 +
 tools/perf/util/parse-events.c  |  104 ++-
 tools/perf/util/parse-events.y  |   10 +-
 tools/perf/util/pmu.c           |   18 +-
 tools/perf/util/pmu.h           |    5 +
 tools/perf/util/pmus.c          |    5 +
 tools/perf/util/pmus.h          |    1 +
 8 files changed, 698 insertions(+), 554 deletions(-)

-- 
2.41.0.rc0.172.g3f132b7071-goog
Re: [PATCH v2 0/4] Hybrid event parsing fixes
Posted by Liang, Kan 2 years, 8 months ago

On 2023-06-01 4:29 a.m., Ian Rogers wrote:
> Correct various issues that have come up in mailing list discussions,
> the most impactful of which is the wildcard opening of events of type
> PERF_TYPE_HARDWARE and PERF_TYPE_HW_CACHE. But also try to avoid a
> parse-error without a warning, have more fall-back behaviors and be
> liberal with the definition of software events.
> 
> The majority of the change is in correcting the parse-event test to
> match the new hybrid parsing.
> 
> Ian Rogers (4):
>   perf pmu: Correct perf_pmu__auto_merge_stats affecting hybrid
>   perf evsel: Add verbose 3 print of evsel name when opening
>   perf parse-events: Wildcard most "numeric" events
>   perf test: Update parse-events expectations

The patch set fixes the issues I found on a hybrid machine.

Tested-by: Kan Liang <kan.liang@linux.intel.com>

It's better to fold the examples (especially for the patch 1) in the
description. So we can understand what's it trying to fix and what's the
expected result now.

Thanks,
Kan

> 
>  tools/perf/tests/parse-events.c | 1108 ++++++++++++++++---------------
>  tools/perf/util/evsel.c         |    1 +
>  tools/perf/util/parse-events.c  |  104 ++-
>  tools/perf/util/parse-events.y  |   10 +-
>  tools/perf/util/pmu.c           |   18 +-
>  tools/perf/util/pmu.h           |    5 +
>  tools/perf/util/pmus.c          |    5 +
>  tools/perf/util/pmus.h          |    1 +
>  8 files changed, 698 insertions(+), 554 deletions(-)
>
Re: [PATCH v2 0/4] Hybrid event parsing fixes
Posted by Arnaldo Carvalho de Melo 2 years, 8 months ago
Em Thu, Jun 01, 2023 at 09:59:20AM -0400, Liang, Kan escreveu:
> 
> 
> On 2023-06-01 4:29 a.m., Ian Rogers wrote:
> > Correct various issues that have come up in mailing list discussions,
> > the most impactful of which is the wildcard opening of events of type
> > PERF_TYPE_HARDWARE and PERF_TYPE_HW_CACHE. But also try to avoid a
> > parse-error without a warning, have more fall-back behaviors and be
> > liberal with the definition of software events.
> > 
> > The majority of the change is in correcting the parse-event test to
> > match the new hybrid parsing.
> > 
> > Ian Rogers (4):
> >   perf pmu: Correct perf_pmu__auto_merge_stats affecting hybrid
> >   perf evsel: Add verbose 3 print of evsel name when opening
> >   perf parse-events: Wildcard most "numeric" events
> >   perf test: Update parse-events expectations
> 
> The patch set fixes the issues I found on a hybrid machine.
> 
> Tested-by: Kan Liang <kan.liang@linux.intel.com>

Thanks, applied.

- Arnaldo

 
> It's better to fold the examples (especially for the patch 1) in the
> description. So we can understand what's it trying to fix and what's the
> expected result now.
> 
> Thanks,
> Kan
> 
> > 
> >  tools/perf/tests/parse-events.c | 1108 ++++++++++++++++---------------
> >  tools/perf/util/evsel.c         |    1 +
> >  tools/perf/util/parse-events.c  |  104 ++-
> >  tools/perf/util/parse-events.y  |   10 +-
> >  tools/perf/util/pmu.c           |   18 +-
> >  tools/perf/util/pmu.h           |    5 +
> >  tools/perf/util/pmus.c          |    5 +
> >  tools/perf/util/pmus.h          |    1 +
> >  8 files changed, 698 insertions(+), 554 deletions(-)
> > 

-- 

- Arnaldo