mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jiri Olsa <jolsa@redhat.com>
To: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Andi Kleen <andi@firstfloor.org>,
	linux-kernel@vger.kernel.org, Andi Kleen <ak@linux.intel.com>,
	jolsa@kernel.org
Subject: Re: [PATCH] perf, tools, stat: Fix perf stat -T
Date: Tue, 28 Jul 2015 16:30:18 +0200	[thread overview]
Message-ID: <20150728143018.GF28175@krava.brq.redhat.com> (raw)
In-Reply-To: <20150728142132.GB575@kernel.org>

On Tue, Jul 28, 2015 at 11:21:32AM -0300, Arnaldo Carvalho de Melo wrote:
> Em Tue, Jul 28, 2015 at 04:10:06PM +0200, Jiri Olsa escreveu:
> > On Mon, Jul 27, 2015 at 04:24:51PM -0700, Andi Kleen wrote:
> > > From: Andi Kleen <ak@linux.intel.com>
> > > 
> > > The transaction length metrics in perf stat -T broke recently.
> > > It would not match the metric correctly and always print K/sec.
> > > This was caused by a incorrect update of the cycles_in_tx statistics.
> > > Update the correct variable.
> > > 
> > > Also the check for zero division was reversed, which resulted
> > > in K/sec being printed for no transactions. Fix this also up.
> > > 
> > > Cc: jolsa@kernel.org
> > > Signed-off-by: Andi Kleen <ak@linux.intel.com>
> > > ---
> > >  tools/perf/util/stat-shadow.c | 8 +++-----
> > >  1 file changed, 3 insertions(+), 5 deletions(-)
> > > 
> > > diff --git a/tools/perf/util/stat-shadow.c b/tools/perf/util/stat-shadow.c
> > > index 53e8bb7..2a5d8d7 100644
> > > --- a/tools/perf/util/stat-shadow.c
> > > +++ b/tools/perf/util/stat-shadow.c
> > > @@ -85,7 +85,7 @@ void perf_stat__update_shadow_stats(struct perf_evsel *counter, u64 *count,
> > >  	else if (perf_evsel__match(counter, HARDWARE, HW_CPU_CYCLES))
> > >  		update_stats(&runtime_cycles_stats[ctx][cpu], count[0]);
> > >  	else if (perf_stat_evsel__is(counter, CYCLES_IN_TX))
> > > -		update_stats(&runtime_transaction_stats[ctx][cpu], count[0]);
> > > +		update_stats(&runtime_cycles_in_tx_stats[ctx][cpu], count[0]);
> > 
> > oops, looks like copy&paste issue.. thanks
> > 
> > 
> > we now print comment line if the avg is 0, but I think it's ok
> > 
> > Acked-by: Jiri Olsa <jolsa@kernel.org>
> 
> This affects just perf/core, right?

I guess, dont think it's an urgent one.. Andi, please speak up ;-)

jirka

  reply	other threads:[~2015-07-28 14:30 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-27 23:24 Andi Kleen
2015-07-28 14:10 ` Jiri Olsa
2015-07-28 14:21   ` Arnaldo Carvalho de Melo
2015-07-28 14:30     ` Jiri Olsa [this message]
2015-07-28 14:32       ` Arnaldo Carvalho de Melo
2015-07-28 14:37         ` Jiri Olsa
2015-07-28 17:25           ` Andi Kleen
2015-07-31 13:48 ` [tip:perf/core] perf stat: Fix transaction lenght metrics 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=20150728143018.GF28175@krava.brq.redhat.com \
    --to=jolsa@redhat.com \
    --cc=acme@kernel.org \
    --cc=ak@linux.intel.com \
    --cc=andi@firstfloor.org \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®