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] [day] [month] [year] [list]
Date:   Mon, 28 Aug 2017 09:47:38 -0700
From:   Andi Kleen <andi@...stfloor.org>
To:     Jiri Olsa <jolsa@...hat.com>
Cc:     Andi Kleen <andi@...stfloor.org>, acme@...nel.org,
        jolsa@...nel.org, linux-kernel@...r.kernel.org,
        Andi Kleen <ak@...ux.intel.com>
Subject: Re: [PATCH v2 17/19] perf, tools, stat: Support duration_time for
 metrics

On Mon, Aug 28, 2017 at 11:19:31AM +0200, Jiri Olsa wrote:
> On Fri, Aug 11, 2017 at 04:26:32PM -0700, Andi Kleen wrote:
> > From: Andi Kleen <ak@...ux.intel.com>
> > 
> > Some of the metrics formulas (like GFLOPs) need to know how long
> > the measurement period is. Support an internal event called duration_time, which
> > reports time in second. It maps to the dummy event, but is
> > special cased for statistics to report the walltime duration.
> > 
> > So far it is not printed, but only used internally for metrics.
> > 
> > Signed-off-by: Andi Kleen <ak@...ux.intel.com>
> > ---
> >  tools/perf/util/parse-events.l |  1 +
> >  tools/perf/util/stat-shadow.c  | 17 +++++++++++++----
> >  2 files changed, 14 insertions(+), 4 deletions(-)
> > 
> > diff --git a/tools/perf/util/parse-events.l b/tools/perf/util/parse-events.l
> > index fdb5bb52f01f..ea2426daf7e8 100644
> > --- a/tools/perf/util/parse-events.l
> > +++ b/tools/perf/util/parse-events.l
> > @@ -288,6 +288,7 @@ cpu-migrations|migrations			{ return sym(yyscanner, PERF_TYPE_SOFTWARE, PERF_COU
> >  alignment-faults				{ return sym(yyscanner, PERF_TYPE_SOFTWARE, PERF_COUNT_SW_ALIGNMENT_FAULTS); }
> >  emulation-faults				{ return sym(yyscanner, PERF_TYPE_SOFTWARE, PERF_COUNT_SW_EMULATION_FAULTS); }
> >  dummy						{ return sym(yyscanner, PERF_TYPE_SOFTWARE, PERF_COUNT_SW_DUMMY); }
> > +duration_time					{ return sym(yyscanner, PERF_TYPE_SOFTWARE, PERF_COUNT_SW_DUMMY); }
> 
> could you please use '-' (current style) instead of '_'

This would require escaping in the expressions because - is a vaid
operator. It looks nicer with the _ and it's only used internally
anyways.

-Andi

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ