From: Namhyung Kim <namhyung@kernel.org>
To: Lucas Stach <l.stach@pengutronix.de>, Ian Rogers <irogers@google.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>,
Arnaldo Carvalho de Melo <acme@kernel.org>,
Mark Rutland <mark.rutland@arm.com>, Jiri Olsa <jolsa@kernel.org>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
patchwork-lst@pengutronix.de, linux-perf-users@vger.kernel.org,
kernel@pengutronix.de, Kan Liang <kan.liang@linux.intel.com>
Subject: Re: [PATCH] perf jevents: return potentially empty metrics table
Date: Wed, 3 Jul 2024 15:33:19 -0700 [thread overview]
Message-ID: <ZoXRr9wcE98ijyFA@google.com> (raw)
In-Reply-To: <8b31bc0823df42e1ef4c22eac159fa58694887c7.camel@pengutronix.de>
Hello,
On Mon, Jul 01, 2024 at 07:19:55PM +0200, Lucas Stach wrote:
> Hi,
>
> has this patch fallen through the cracks? It fixes a functional
> regression where the DDR controller metrics are completely unavailable
> on all i.MX8M* systems and thus would be nice if someone could have a
> look.
>
> Regards,
> Lucas
>
> Am Freitag, dem 31.05.2024 um 21:44 +0200 schrieb Lucas Stach:
> > Don't return NULL when a empty (num_pmus = 0) metrics table is encountered,
> > as this causes many of the users to bail out, which will skip matching any
> > potentially existing sys metrics later on. Instead return the empty table
> > which will be handled properly by the iterators and allows matching to
> > continue.
> >
> > This fixes metrics reporting on systems where only the sys, but not the
> > core PMUs have metrics defined.
> >
> > Fixes: f20c15d13f01 ("perf pmu-events: Remember the perf_events_map for a PMU")
> > Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Looks ok to me. Ian?
Thanks,
Namhyung
> > ---
> > tools/perf/pmu-events/jevents.py | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/tools/perf/pmu-events/jevents.py b/tools/perf/pmu-events/jevents.py
> > index e42efc16723e..0a1ed9ee1429 100755
> > --- a/tools/perf/pmu-events/jevents.py
> > +++ b/tools/perf/pmu-events/jevents.py
> > @@ -1081,7 +1081,7 @@ const struct pmu_metrics_table *perf_pmu__find_metrics_table(struct perf_pmu *pm
> > if (!map)
> > return NULL;
> >
> > - if (!pmu)
> > + if (!pmu || !map->metric_table.num_pmus)
> > return &map->metric_table;
> >
> > for (size_t i = 0; i < map->metric_table.num_pmus; i++) {
>
next prev parent reply other threads:[~2024-07-03 22:33 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-31 19:44 [PATCH] perf jevents: return potentially empty metrics table Lucas Stach
2024-07-01 17:19 ` Lucas Stach
2024-07-03 22:33 ` Namhyung Kim [this message]
2024-07-12 21:54 ` Ian Rogers
2024-07-15 15:12 ` James Clark
2024-07-15 15:54 ` Lucas Stach
2024-07-15 21:43 ` Ian Rogers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZoXRr9wcE98ijyFA@google.com \
--to=namhyung@kernel.org \
--cc=acme@kernel.org \
--cc=alexander.shishkin@linux.intel.com \
--cc=irogers@google.com \
--cc=jolsa@kernel.org \
--cc=kan.liang@linux.intel.com \
--cc=kernel@pengutronix.de \
--cc=l.stach@pengutronix.de \
--cc=linux-perf-users@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mingo@redhat.com \
--cc=patchwork-lst@pengutronix.de \
--cc=peterz@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).