Re: [PATCH v1] perf test: Fix "PMU event table sanity" for NO_JEVENTS=1

From: Arnaldo Carvalho de Melo
Date: Tue Mar 14 2023 - 07:44:02 EST


Em Wed, Mar 08, 2023 at 09:58:16AM +0000, John Garry escreveu:
> On 08/03/2023 00:27, Ian Rogers wrote:
> > A table was renamed and needed to be renamed in the empty case.
> >
> > Fixes: 62774db2a05d ("perf jevents: Generate metrics and events as separate tables")
>
> This looks ok, so:
>
> Reviewed-by: John Garry <john.g.garry@xxxxxxxxxx>

Thanks, applied.

- Arnaldo


> But a comment, below.
>
> > Signed-off-by: Ian Rogers <irogers@xxxxxxxxxx>
> > ---
> > tools/perf/pmu-events/empty-pmu-events.c | 6 +++---
> > 1 file changed, 3 insertions(+), 3 deletions(-)
> >
> > diff --git a/tools/perf/pmu-events/empty-pmu-events.c b/tools/perf/pmu-events/empty-pmu-events.c
> > index a938b74cf487..e74defb5284f 100644
> > --- a/tools/perf/pmu-events/empty-pmu-events.c
> > +++ b/tools/perf/pmu-events/empty-pmu-events.c
> > @@ -227,7 +227,7 @@ static const struct pmu_events_map pmu_events_map[] = {
> > },
> > };
> > -static const struct pmu_event pme_test_soc_sys[] = {
> > +static const struct pmu_event pmu_events__test_soc_sys[] = {
>
> Would it make sense or even possible to put these table names in macros in a
> common header?
>
> Thanks,
> John
>
> > {
> > .name = "sys_ddr_pmu.write_cycles",
> > .event = "event=0x2b",
> > @@ -258,8 +258,8 @@ struct pmu_sys_events {
> > static const struct pmu_sys_events pmu_sys_event_tables[] = {
> > {
> > - .table = { pme_test_soc_sys },
> > - .name = "pme_test_soc_sys",
> > + .table = { pmu_events__test_soc_sys },
> > + .name = "pmu_events__test_soc_sys",
> > },
> > {
> > .table = { 0 }
>

--

- Arnaldo