lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAP-5=fUQ2nAHyN5Egxfpyotc0u4O1wsZ8VKzwffOhGhV++L6=Q@mail.gmail.com>
Date:   Fri, 29 Jul 2022 07:24:10 -0700
From:   Ian Rogers <irogers@...gle.com>
To:     John Garry <john.garry@...wei.com>
Cc:     Will Deacon <will@...nel.org>, James Clark <james.clark@....com>,
        Mike Leach <mike.leach@...aro.org>,
        Leo Yan <leo.yan@...aro.org>,
        Peter Zijlstra <peterz@...radead.org>,
        Ingo Molnar <mingo@...hat.com>,
        Arnaldo Carvalho de Melo <acme@...nel.org>,
        Mark Rutland <mark.rutland@....com>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Jiri Olsa <jolsa@...nel.org>,
        Namhyung Kim <namhyung@...nel.org>,
        Andi Kleen <ak@...ux.intel.com>,
        Zhengjun Xing <zhengjun.xing@...ux.intel.com>,
        Ravi Bangoria <ravi.bangoria@....com>,
        Kan Liang <kan.liang@...ux.intel.com>,
        Adrian Hunter <adrian.hunter@...el.com>,
        linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
        linux-perf-users@...r.kernel.org,
        Stephane Eranian <eranian@...gle.com>
Subject: Re: [PATCH v3 05/17] perf jevents: Remove the type/version variables

On Fri, Jul 29, 2022 at 1:30 AM John Garry <john.garry@...wei.com> wrote:
>
> On 29/07/2022 08:43, Ian Rogers wrote:
> > pmu_events_map has a type variable that is always initialized to "core"
> > and a version variable that is never read. Remove these from the API as
> > it is straightforward to add them back when necessary.
> >
> > Signed-off-by: Ian Rogers <irogers@...gle.com>
>
> Reviewed-by: John Garry <john.garry@...wei.com>
>
> Please note the questions, below.
>
> > ---
> >   tools/perf/pmu-events/empty-pmu-events.c | 6 ++----
> >   tools/perf/pmu-events/jevents.py         | 6 ------
> >   tools/perf/pmu-events/pmu-events.h       | 2 --
> >   tools/perf/tests/expand-cgroup.c         | 2 --
> >   tools/perf/tests/parse-metric.c          | 2 --
> >   5 files changed, 2 insertions(+), 16 deletions(-)
> >
> > diff --git a/tools/perf/pmu-events/empty-pmu-events.c b/tools/perf/pmu-events/empty-pmu-events.c
> > index 77e655c6f116..4182a986f505 100644
> > --- a/tools/perf/pmu-events/empty-pmu-events.c
> > +++ b/tools/perf/pmu-events/empty-pmu-events.c
> > @@ -110,15 +110,13 @@ static const struct pmu_event pme_test_soc_cpu[] = {
> >
> >   const struct pmu_events_map pmu_events_map[] = {
> >       {
> > +             .arch = "testarch",
>
> Is this really supposed to be part of this patch?

Agreed. Looks like it should have been in the previous.

Thanks,
Ian

> >               .cpuid = "testcpu",
> > -             .version = "v1",
> > -             .type = "core",
> >               .table = pme_test_soc_cpu,
> >       },
> >       {
> > +             .arch = 0,
>
> Same as above
>
> >               .cpuid = 0,
> > -             .version = 0,
> > -             .type = 0,
> >               .table = 0,
> >       },
> >   };
> > diff --git a/tools/perf/pmu-events/jevents.py b/tools/perf/pmu-events/jevents.py
> > index e6e6c42c3f8a..98d18d5c3830 100755
> > --- a/tools/perf/pmu-events/jevents.py
> > +++ b/tools/perf/pmu-events/jevents.py
> > @@ -312,8 +312,6 @@ def print_mapping_table(archs: Sequence[str]) -> None:
> >         _args.output_file.write("""{
> >   \t.arch = "testarch",
> >   \t.cpuid = "testcpu",
> > -\t.version = "v1",
> > -\t.type = "core",
> >   \t.table = pme_test_soc_cpu,
> >   },
> >   """)
> > @@ -329,8 +327,6 @@ def print_mapping_table(archs: Sequence[str]) -> None:
> >               _args.output_file.write(f"""{{
> >   \t.arch = "{arch}",
> >   \t.cpuid = "{cpuid}",
> > -\t.version = "{row[1]}",
> > -\t.type = "{row[3]}",
> >   \t.table = {tblname}
> >   }},
> >   """)
> > @@ -339,8 +335,6 @@ def print_mapping_table(archs: Sequence[str]) -> None:
> >     _args.output_file.write("""{
> >   \t.arch = 0,
> >   \t.cpuid = 0,
> > -\t.version = 0,
> > -\t.type = 0,
> >   \t.table = 0,
> >   }
> >   };
> > diff --git a/tools/perf/pmu-events/pmu-events.h b/tools/perf/pmu-events/pmu-events.h
> > index 7a360792635f..a491b117c8ac 100644
> > --- a/tools/perf/pmu-events/pmu-events.h
> > +++ b/tools/perf/pmu-events/pmu-events.h
> > @@ -40,8 +40,6 @@ struct pmu_event {
> >   struct pmu_events_map {
> >       const char *arch;
> >       const char *cpuid;
> > -     const char *version;
> > -     const char *type;               /* core, uncore etc */
> >       const struct pmu_event *table;
> >   };
> >
> > diff --git a/tools/perf/tests/expand-cgroup.c b/tools/perf/tests/expand-cgroup.c
> > index dfefe5b60eb2..dc4038f997d7 100644
> > --- a/tools/perf/tests/expand-cgroup.c
> > +++ b/tools/perf/tests/expand-cgroup.c
> > @@ -197,8 +197,6 @@ static int expand_metric_events(void)
> >       };
> >       const struct pmu_events_map ev_map = {
> >               .cpuid          = "test",
> > -             .version        = "1",
> > -             .type           = "core",
> >               .table          = pme_test,
> >       };
> >
> > diff --git a/tools/perf/tests/parse-metric.c b/tools/perf/tests/parse-metric.c
> > index 07b6f4ec024f..1b811a26f4ee 100644
> > --- a/tools/perf/tests/parse-metric.c
> > +++ b/tools/perf/tests/parse-metric.c
> > @@ -81,8 +81,6 @@ static struct pmu_event pme_test[] = {
> >
> >   static const struct pmu_events_map map = {
> >       .cpuid          = "test",
> > -     .version        = "1",
> > -     .type           = "core",
> >       .table          = pme_test,
> >   };
> >
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ