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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 3 Aug 2020 08:54:16 -0700
From:   Ian Rogers <irogers@...gle.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>
Subject: Re: [PATCHv4 00/19] perf metric: Add support to reuse metric

On Sat, Aug 1, 2020 at 4:41 AM Paul A. Clarke <pc@...ibm.com> wrote:
>
> On Wed, Jul 29, 2020 at 11:18:49AM +0200, Jiri Olsa wrote:
> > 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.
> >
> > v4 changes:
> >   - removed acks from patch because it changed a bit
> >     with the last fixes:
> >       perf metric: Collect referenced metrics in struct metric_ref_node
> >   - fixed runtime metrics [Kajol Jain]
> >   - increased recursion depth [Paul A. Clarke]
> >   - changed patches due to dependencies:
> >       perf metric: Collect referenced metrics in struct metric_ref_node
> >       perf metric: Add recursion check when processing nested metrics
> >       perf metric: Rename struct egroup to metric
> >       perf metric: Rename group_list to metric_list
> >
> > Also available in here:
> >   git://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git
> >   perf/metric
>
> I built and ran from the above git branch, and things seem to work.
> Indeed, I was able to apply my changes to exploit the new capabilities
> via modifications to tools/perf/pmu-events/arch/powerpc/power9/metrics.json,
> as I posted earlier (and will submit once this set gets merged).
>
> Tested-by: Paul A. Clarke <pc@...ibm.com>
>
> One thing I noted, but which also occurs without these patches, is that
> the perf metrics are not computed unless run as root:
> --
> $ perf stat --metrics br_misprediction_percent command
>
>  Performance counter stats for 'command':
>
>      1,823,530,051      pm_br_pred:u
>          2,662,705      pm_br_mpred_cmpl:u
>
> $ /usr/bin/sudo perf stat --metrics br_misprediction_percent command
>
>  Performance counter stats for 'command':
>
>      1,824,655,269      pm_br_pred                #     0.09 br_misprediction_percent
>          1,654,466      pm_br_mpred_cmpl
> --
>
> Is that expected?  I don't think it's always been that way.

I agree Paul, this seems broken. I've noticed a bunch of issues with
printing CSV, per-socket output and so on. Jiri may have a better idea
but I plan to look at problems in this area later, and hopefully stick
a few tests on it :-)

Thanks,
Ian

> PC

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ