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:	Wed, 1 Jun 2016 07:56:48 -0700
From:	Andi Kleen <ak@...ux.intel.com>
To:	Nilay Vaish <nilayvaish@...il.com>
Cc:	Andi Kleen <andi@...stfloor.org>, acme@...nel.org,
	jolsa@...nel.org, Linux Kernel list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 2/4] perf stat: Add computation of TopDown formulas

On Wed, Jun 01, 2016 at 09:50:07AM -0500, Nilay Vaish wrote:
> On 24 May 2016 at 14:52, Andi Kleen <andi@...stfloor.org> wrote:
> > +static double td_be_bound(int ctx, int cpu)
> > +{
> > +       double sum = (td_fe_bound(ctx, cpu) +
> > +                     td_bad_spec(ctx, cpu) +
> > +                     td_retiring(ctx, cpu));
> > +       if (sum == 0)
> > +               return 0;
> > +       return sanitize_val(1.0 - sum);
> > +}
> > +
> 
> Can you explain why we need the check on sum?

You mean the if statement?

Otherwise if nothing was measured it would always report everything backend bound,
which wouldn't be correct.

-Andi

-- 
ak@...ux.intel.com -- Speaking for myself only

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ