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, 22 Jul 2020 20:11:58 +0200
From:   Jiri Olsa <jolsa@...hat.com>
To:     "Paul A. Clarke" <pc@...ibm.com>
Cc:     Jiri Olsa <jolsa@...nel.org>,
        Arnaldo Carvalho de Melo <acme@...nel.org>,
        lkml <linux-kernel@...r.kernel.org>,
        Ingo Molnar <mingo@...nel.org>,
        Namhyung Kim <namhyung@...nel.org>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Peter Zijlstra <a.p.zijlstra@...llo.nl>,
        Michael Petlan <mpetlan@...hat.com>,
        Andi Kleen <ak@...ux.intel.com>,
        Kajol Jain <kjain@...ux.ibm.com>,
        John Garry <john.garry@...wei.com>,
        Stephane Eranian <eranian@...gle.com>,
        Ian Rogers <irogers@...gle.com>
Subject: Re: [PATCHv3 00/19] perf metric: Add support to reuse metric

On Tue, Jul 21, 2020 at 09:48:48AM -0500, Paul A. Clarke wrote:
> On Sun, Jul 19, 2020 at 08:13:01PM +0200, Jiri Olsa wrote:
> > hi,
> > this patchset is adding the support to reused metric in
> > another metric.
> > 
> > For example, to define IPC by using CPI with change like:
> > 
> >      {
> >          "BriefDescription": "Instructions Per Cycle (per Logical Processor)",
> > -        "MetricExpr": "INST_RETIRED.ANY / CPU_CLK_UNHALTED.THREAD",
> > +        "MetricExpr": "1/CPI",
> >          "MetricGroup": "TopDownL1",
> >          "MetricName": "IPC"
> >      },
> > 
> > I won't be able to find all the possible places we could
> > use this at, so I wonder you guys (who was asking for this)
> > would try it and come up with comments if there's something
> > missing or we could already use it at some places.
> > 
> > It's based on Arnaldo's tmp.perf/core.
> > 
> > v3 changes:
> >   - added some acks
> >   - some patches got merged
> >   - added missing zalloc include [John Garry]
> >   - added ids array outside the egroup object [Ian]
> >   - removed wrong m->has_constraint assignment [Ian]
> >   - renamed 'list' to 'metric_list' [Ian]
> >   - fixed group metric and added test for it [Paul A. Clarke]
> >   - fixed memory leak [Arnaldo]
> >   - using lowercase keys for metrics in hashmap, because jevents
> >     converts metric_expr to lowercase
> > 
> > Also available in here:
> >   git://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git
> >   perf/metric
> 
> These changes seem to be mostly working for me.
> 
> I attempted to exploit the new capability in the metrics definitions in
> tools/perf/pmu-events/arch/powerpc/power9/metrics.json.  Those changes
> are included below.
> 
> The one problem I found is with the "cpi_breakdown" metric group, as it
> no longer works:
> ```
> # perf stat --metrics cpi_breakdown ./command
> Cannot find metric or group `cpi_breakdown'
> ```
> 
> "cpi_breakdown" does show up in `perf list --metricgroup`, and all of the
> (95!) metrics listed in that group are usable, so it's not obvious whether
> my changes have a problem, or merely provoke one.

I underestimated the recursion depth setup for groups,
your change is working for me with following change:

-#define RECURSION_ID_MAX 100
+#define RECURSION_ID_MAX 1000

jirka

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ