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]
Date:   Wed, 29 Jun 2022 11:11:31 -0700
From:   Ian Rogers <irogers@...gle.com>
To:     John Garry <john.garry@...wei.com>
Cc:     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>,
        Kan Liang <kan.liang@...ux.intel.com>,
        Andi Kleen <ak@...ux.intel.com>,
        Zhengjun Xing <zhengjun.xing@...ux.intel.com>,
        Felix Fietkau <nbd@....name>, Qi Liu <liuqi115@...wei.com>,
        Like Xu <likexu@...cent.com>, linux-kernel@...r.kernel.org,
        linux-perf-users@...r.kernel.org,
        Nick Forrington <nick.forrington@....com>,
        Kajol Jain <kjain@...ux.ibm.com>,
        James Clark <james.clark@....com>,
        Andrew Kilroy <andrew.kilroy@....com>,
        "Paul A . Clarke" <pc@...ibm.com>, Will Deacon <will@...nel.org>,
        Mathieu Poirier <mathieu.poirier@...aro.org>,
        ananth.narayan@....com, ravi.bangoria@....com,
        santosh.shukla@....com, sandipan.das@....com,
        Caleb Biggers <caleb.biggers@...el.com>,
        Perry Taylor <perry.taylor@...el.com>,
        Kshipra Bopardikar <kshipra.bopardikar@...el.com>,
        Stephane Eranian <eranian@...gle.com>,
        Ian Rogers <rogers.email@...il.com>,
        Thomas Richter <tmricht@...ux.ibm.com>
Subject: Re: [PATCH v6 2/4] perf jevents: Add python converter script

On Wed, Jun 29, 2022 at 9:56 AM John Garry <john.garry@...wei.com> wrote:
>
> On 27/06/2022 03:57, Ian Rogers wrote:
> > +
> > +    def unit_to_pmu(unit: str) -> str:
> > +      """Convert a JSON Unit to Linux PMU name."""
> > +      if not unit:
> > +        return None
> > +      # Comment brought over from jevents.c:
> > +      # it's not realistic to keep adding these, we need something more scalable ...
>
> Since we're converting to python it might be a good idea to consider
> this - ever have an ideas on something better?

I think it is something ripe for cleanup, no particular thoughts on
this case. I'd like to make it so that jevents/pmu-events is aligned
with sysfs, which this relates to.

Thanks,
Ian

> Thanks,
> John
>
> > +      table = {
> > +          'CBO': 'uncore_cbox',
> > +          'QPI LL': 'uncore_qpi',
> > +          'SBO': 'uncore_sbox',
> > +          'iMPH-U': 'uncore_arb',
> > +          'CPU-M-CF': 'cpum_cf',
> > +          'CPU-M-SF': 'cpum_sf',
> > +          'UPI LL': 'uncore_upi',
> > +          'hisi_sicl,cpa': 'hisi_sicl,cpa',
> > +          'hisi_sccl,ddrc': 'hisi_sccl,ddrc',
> > +          'hisi_sccl,hha': 'hisi_sccl,hha',
> > +          'hisi_sccl,l3c': 'hisi_sccl,l3c',
> > +          'imx8_ddr': 'imx8_ddr',
> > +          'L3PMC': 'amd_l3',
> > +          'DFPMC': 'amd_df',
> > +          'cpu_core': 'cpu_core',
> > +          'cpu_atom': 'cpu_atom',
> > +      }
> > +      return table[unit] if unit in table else f'uncore_{unit.lower()}'
> > +
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ