[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150728143018.GF28175@krava.brq.redhat.com>
Date: Tue, 28 Jul 2015 16:30:18 +0200
From: Jiri Olsa <jolsa@...hat.com>
To: Arnaldo Carvalho de Melo <acme@...nel.org>
Cc: Andi Kleen <andi@...stfloor.org>, linux-kernel@...r.kernel.org,
Andi Kleen <ak@...ux.intel.com>, jolsa@...nel.org
Subject: Re: [PATCH] perf, tools, stat: Fix perf stat -T
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@...ux.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@...nel.org
> > > Signed-off-by: Andi Kleen <ak@...ux.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@...nel.org>
>
> This affects just perf/core, right?
I guess, dont think it's an urgent one.. Andi, please speak up ;-)
jirka
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists