[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAP-5=fVc+hvww9YAX2-UfQTJyFn7qM_7aoSwZ6SvgZoveMBAdw@mail.gmail.com>
Date: Tue, 21 May 2024 13:48:39 -0700
From: Ian Rogers <irogers@...gle.com>
To: Peter Zijlstra <peterz@...radead.org>, Ingo Molnar <mingo@...hat.com>,
Arnaldo Carvalho de Melo <acme@...nel.org>, Namhyung Kim <namhyung@...nel.org>,
Mark Rutland <mark.rutland@....com>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>, Jiri Olsa <jolsa@...nel.org>,
Ian Rogers <irogers@...gle.com>, Adrian Hunter <adrian.hunter@...el.com>,
Kan Liang <kan.liang@...ux.intel.com>, Ravi Bangoria <ravi.bangoria@....com>,
James Clark <james.clark@....com>, Yang Jihong <yangjihong@...edance.com>,
Ze Gao <zegao2021@...il.com>, Leo Yan <leo.yan@...ux.dev>, Song Liu <song@...nel.org>,
K Prateek Nayak <kprateek.nayak@....com>, Kaige Ye <ye@...ge.org>,
Yicong Yang <yangyicong@...ilicon.com>, linux-perf-users@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 0/5] Event parsing fixes
On Mon, May 13, 2024 at 9:48 PM Ian Rogers <irogers@...gle.com> wrote:
>
> On Thu, May 9, 2024 at 10:38 PM Ian Rogers <irogers@...gle.com> wrote:
> >
> > For the default events, parse from strings rather than use pre-cooked
> > perf_event_attr. This fixes non-x86 heterogeneous CPUs where legacy
> > hardware events wouldn't be opened for all PMUs. v2 was previously
> > just patch 3 but it is extended in v3 to incorporate related fixes.
> >
> > When a sysfs/json event is used in preference to a legacy event, allow
> > evsel__match to still function using a saved hardware config
> > number. This fixes hard coded metrics in stat-shadow for events like
> > "instructions" on Intel that have a sysfs file.
> >
> > Fix/improve uniquifying event names fixing the test "102: perf stat
> > metrics (shadow stat) test:" that was broken by a formatting issue
> > when the sysfs instructions event was used.
> >
> > Having evsel->pmu_name and evsel->pmu->name is confusing, get rid of
> > the former. Fix/improve evsel__sys_has_perf_metrics in the process.
> >
> > Ian Rogers (5):
> > perf evsel: Add alternate_hw_config and use in evsel__match
> > perf stat: Uniquify event name improvements
> > perf stat: Remove evlist__add_default_attrs use strings
> > perf evsel x86: Make evsel__has_perf_metrics work for legacy events
> > perf evsel: Remove pmu_name
>
> Hopefully the first 3 patches here can be a priority given the fixes.
Testing:
https://lore.kernel.org/lkml/20240521192614.3937942-1-acme@kernel.org/
git://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools.git
tags/perf-tools-for-v6.10-1-2024-05-21
I see this failure:
```
102: perf stat metrics (shadow stat) test:
--- start ---
test child forked, pid 785992
IPC is different: 1.31 != (2725291544 / 2085879817)
---- end(-1) ----
```
Which is addressed in the first 3 patches here.
Thanks,
Ian
> Thanks,
> Ian
>
> > tools/perf/arch/x86/util/evlist.c | 74 +-------
> > tools/perf/arch/x86/util/evsel.c | 35 +++-
> > tools/perf/builtin-diff.c | 6 +-
> > tools/perf/builtin-stat.c | 291 ++++++++++++------------------
> > tools/perf/tests/parse-events.c | 2 +-
> > tools/perf/util/evlist.c | 46 +----
> > tools/perf/util/evlist.h | 12 --
> > tools/perf/util/evsel.c | 28 ++-
> > tools/perf/util/evsel.h | 22 +--
> > tools/perf/util/metricgroup.c | 4 +-
> > tools/perf/util/parse-events.c | 52 ++++--
> > tools/perf/util/parse-events.h | 6 +
> > tools/perf/util/pmu.c | 6 +-
> > tools/perf/util/pmu.h | 2 +-
> > tools/perf/util/stat-display.c | 101 ++++++++---
> > tools/perf/util/stat-shadow.c | 14 +-
> > tools/perf/util/stat.c | 2 +-
> > 17 files changed, 305 insertions(+), 398 deletions(-)
> >
> > --
> > 2.45.0.118.g7fe29c98d7-goog
> >
Powered by blists - more mailing lists