lkml.org 
[lkml]   [2016]   [Jun]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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@firstfloor.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@linux.intel.com -- Speaking for myself only

\
 
 \ /
  Last update: 2016-06-01 17:21    [W:0.076 / U:1.384 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site