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]
Message-ID: <20191211230126.GC862919@tassilo.jf.intel.com>
Date:   Wed, 11 Dec 2019 15:01:26 -0800
From:   Andi Kleen <ak@...ux.intel.com>
To:     Jiri Olsa <jolsa@...nel.org>
Cc:     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>,
        Joe Mario <jmario@...hat.com>, Kajol Jain <kjain@...ux.ibm.com>
Subject: Re: [RFC 0/3] perf tools: Add support for used defined metric

On Wed, Dec 11, 2019 at 11:47:57PM +0100, Jiri Olsa wrote:
> hi,
> Joe asked for possibility to add user defined metrics. Given that
> we already have metrics support, I added --metric option that allows
> to specify metric on the command line, like:
> 
>   # perf stat  --metric 'DECODED_ICACHE_UOPS% = 100 * (idq.dsb_uops / \
>     (idq.ms_uops + idq.mite_uops + idq.dsb_uops + lsd.uops))' ...
> 
> The code facilitates the current metric code, and I was surprised
> how easy it was, so I'm not sure I omitted something ;-)

There are some asserts you can hit, like for too many events.

Also some of the syntax (e.g. using @ instead of / and escapes) are
not super user friendly.

Other than that it should be ok.

Of course it would be better to put it into a file,
and then support comments etc.

I've been considering some extensions to perf to support @file
reading with comment support.

Right now there are some very odd bugs when you do that, lie

-e 'event,<newline>
event,<newline>
event...'

adds the newline to the event name, which breaks the output formats.

-Andi

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ