Re: [PATCH 2/4] perf stat: Add computation of TopDown formulas

2016-06-02 Thread Andi Kleen
On Thu, Jun 02, 2016 at 06:56:51AM -0500, Nilay Vaish wrote: > Andi, I am talking about the if statement. I don't know why it would > happen that nothing got measured. I am guessing you saw it happen. > May be we can add a comment in the patch that it is possible that all > counter values are ze

Re: [PATCH 2/4] perf stat: Add computation of TopDown formulas

2016-06-02 Thread Nilay Vaish
Andi, I am talking about the if statement. I don't know why it would happen that nothing got measured. I am guessing you saw it happen. May be we can add a comment in the patch that it is possible that all counter values are zero and therefore we need that if statement. -- Nilay On 1 June 2016

Re: [PATCH 2/4] perf stat: Add computation of TopDown formulas

2016-06-01 Thread Andi Kleen
On Wed, Jun 01, 2016 at 09:50:07AM -0500, Nilay Vaish wrote: > On 24 May 2016 at 14:52, Andi Kleen wrote: > > +static double td_be_bound(int ctx, int cpu) > > +{ > > + double sum = (td_fe_bound(ctx, cpu) + > > + td_bad_spec(ctx, cpu) + > > + td_retirin

Re: [PATCH 2/4] perf stat: Add computation of TopDown formulas

2016-06-01 Thread Nilay Vaish
On 24 May 2016 at 14:52, Andi Kleen 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; > +