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, 20 Nov 2017 10:04:19 +0100
From:   Jiri Olsa <jolsa@...hat.com>
To:     Andi Kleen <andi@...stfloor.org>
Cc:     acme@...nel.org, jolsa@...nel.org, linux-kernel@...r.kernel.org,
        Andi Kleen <ak@...ux.intel.com>
Subject: Re: [PATCH v3 3/3] perf, tools, script: Allow computing metrics in
 perf script

On Fri, Nov 17, 2017 at 01:43:00PM -0800, Andi Kleen wrote:

SNIP

> ---
>  tools/perf/Documentation/perf-script.txt | 10 +++-
>  tools/perf/builtin-script.c              | 97 +++++++++++++++++++++++++++++++-
>  tools/perf/util/metricgroup.c            |  4 ++
>  3 files changed, 108 insertions(+), 3 deletions(-)
> 
> diff --git a/tools/perf/Documentation/perf-script.txt b/tools/perf/Documentation/perf-script.txt
> index 2811fcf684cb..974ceb12c7f3 100644
> --- a/tools/perf/Documentation/perf-script.txt
> +++ b/tools/perf/Documentation/perf-script.txt
> @@ -117,7 +117,7 @@ OPTIONS
>          Comma separated list of fields to print. Options are:
>          comm, tid, pid, time, cpu, event, trace, ip, sym, dso, addr, symoff,
>          srcline, period, iregs, uregs, brstack, brstacksym, flags, bpf-output, brstackinsn,
> -        brstackoff, callindent, insn, insnlen, synth, phys_addr.
> +	brstackoff, callindent, insn, insnlen, synth, phys_addr, metric.
>          Field list can be prepended with the type, trace, sw or hw,
>          to indicate to which event type the field list applies.
>          e.g., -F sw:comm,tid,time,ip,sym  and -F trace:time,cpu,trace
> @@ -217,6 +217,14 @@ OPTIONS
>  
>  	The brstackoff field will print an offset into a specific dso/binary.
>  
> +	With the metric option perf script can compute metrics for
> +	sampling periods, similar to perf stat. This requires
> +	specifying a group with multiple metrics with the :S option
> +	for perf record. perf will sample on the first event, and
> +	compute metrics for all the events in the group. Please note
> +	that the metric computed is averaged over the whole sampling
> +	period, not just for the sample point.

hum, is it? I see you call perf_stat__reset_shadow_stats for every
group start.. which I'd think means you see metric for current
leader sample point

jirka

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ