All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nilay Vaish <nilayvaish@gmail.com>
To: Andi Kleen <ak@linux.intel.com>
Cc: Andi Kleen <andi@firstfloor.org>,
	acme@kernel.org, jolsa@kernel.org,
	Linux Kernel list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/4] perf stat: Add computation of TopDown formulas
Date: Thu, 2 Jun 2016 06:56:51 -0500	[thread overview]
Message-ID: <CACbG3083eGXCiUFY_n8+N6s9RMZYbq=p4i617-JViaUHcJ1pSA@mail.gmail.com> (raw)
In-Reply-To: <20160601145648.GP22049@tassilo.jf.intel.com>

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 at 09:56, Andi Kleen <ak@linux.intel.com> wrote:
> 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

  reply	other threads:[~2016-06-02 11:57 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-24 19:52 [PATCH 1/4] perf stat: Basic support for TopDown in perf stat Andi Kleen
2016-05-24 19:52 ` [PATCH 2/4] perf stat: Add computation of TopDown formulas Andi Kleen
2016-06-01 14:50   ` Nilay Vaish
2016-06-01 14:56     ` Andi Kleen
2016-06-02 11:56       ` Nilay Vaish [this message]
2016-06-02 14:26         ` Andi Kleen
2016-06-08  8:39   ` [tip:perf/core] " tip-bot for Andi Kleen
2016-05-24 19:52 ` [PATCH 3/4] perf stat: Print topology/time headers with --metric-only Andi Kleen
2016-06-08  8:39   ` [tip:perf/core] " tip-bot for Andi Kleen
2016-05-24 19:52 ` [PATCH 4/4] perf stat: Add missing aggregation headers for --metric-only CSV Andi Kleen
2016-06-08  8:40   ` [tip:perf/core] " tip-bot for Andi Kleen
2016-05-30 16:01 ` [PATCH 1/4] perf stat: Basic support for TopDown in perf stat Arnaldo Carvalho de Melo
2016-05-30 16:04   ` Andi Kleen
2016-05-30 16:19     ` Arnaldo Carvalho de Melo
2016-06-06 14:00       ` Arnaldo Carvalho de Melo
2016-06-06 14:11         ` Arnaldo Carvalho de Melo
2016-06-06 14:36           ` Andi Kleen
2016-06-01 14:24 ` Nilay Vaish
2016-06-01 14:31   ` Andi Kleen
2016-06-01 15:24   ` Andi Kleen
2016-06-02 11:52     ` Nilay Vaish
2016-06-08  8:38 ` [tip:perf/core] " tip-bot for Andi Kleen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CACbG3083eGXCiUFY_n8+N6s9RMZYbq=p4i617-JViaUHcJ1pSA@mail.gmail.com' \
    --to=nilayvaish@gmail.com \
    --cc=acme@kernel.org \
    --cc=ak@linux.intel.com \
    --cc=andi@firstfloor.org \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --subject='Re: [PATCH 2/4] perf stat: Add computation of TopDown formulas' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.