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:   Sat, 27 Jun 2020 09:13:28 +0100
From:   John Garry <john.garry@...wei.com>
To:     Jiri Olsa <jolsa@...nel.org>,
        Arnaldo Carvalho de Melo <acme@...nel.org>
CC:     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>,
        "Paul A. Clarke" <pc@...ibm.com>,
        Stephane Eranian <eranian@...gle.com>,
        Ian Rogers <irogers@...gle.com>
Subject: Re: [RFC 00/10] perf tools: Add support to reuse metric

On 26/06/2020 20:47, Jiri Olsa wrote:
> hi,
> this patchset is adding the support to reused metric in another
> metric. The metric needs to be referenced by 'metric:' prefix.
> 

I notice that there is much repetition in the x86 metric JSONs between CPUs.

So I know it's not the same as what you propose here, but jevents 
standard arch events feature could be used to reduce the repetition.

I'm guessing that those metric JSONs are human generated, so would be 
suitable; unlike the regular JSONs, which are automated.

Thanks,
John

> 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/metric: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.
> 
> Also available in here:
>    git://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git
>    perf/metric
> 
> thanks,
> jirka
> 
> 
> ---
> Jiri Olsa (10):
>        perf tools: Rename expr__add_id to expr__add_val
>        perf tools: Add struct expr_parse_data to keep expr value
>        perf tools: Add expr__add_id function
>        perf tools: Change expr__get_id to return struct expr_parse_data
>        perf tools: Add expr__del_id function
>        perf tools: Collect other metrics in struct egroup
>        perf tools: Collect other metrics in struct metric_expr
>        perf tools: Add other metrics to hash data
>        perf tools: Compute other metrics
>        perf tests: Add cache_miss_cycles to metric parse test
> 
>   tools/perf/pmu-events/arch/x86/skylake/skl-metrics.json |   2 +-
>   tools/perf/tests/expr.c                                 |   7 ++--
>   tools/perf/tests/parse-metric.c                         |  33 +++++++++++++++++
>   tools/perf/tests/pmu-events.c                           |   4 +--
>   tools/perf/util/expr.c                                  | 115 +++++++++++++++++++++++++++++++++++++++++++++-------------
>   tools/perf/util/expr.h                                  |  24 +++++++++++--
>   tools/perf/util/expr.y                                  |  34 ++++++++++++++----
>   tools/perf/util/metricgroup.c                           | 187 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--------
>   tools/perf/util/metricgroup.h                           |   6 ++++
>   tools/perf/util/stat-shadow.c                           |  23 +++++++-----
>   10 files changed, 374 insertions(+), 61 deletions(-)
> 
> .
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ