All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jiri Olsa <jolsa@redhat.com>
To: Mel Gorman <mgorman@techsingularity.net>
Cc: Jiri Olsa <jolsa@kernel.org>,
	Arnaldo Carvalho de Melo <acme@redhat.com>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: perf stat stddev reporting broken since "perf stat: Introduce read_counters function"
Date: Tue, 19 Jan 2016 09:16:23 +0100	[thread overview]
Message-ID: <20160119081623.GC20358@krava.brq.redhat.com> (raw)
In-Reply-To: <20160119074228.GB20358@krava.brq.redhat.com>

On Tue, Jan 19, 2016 at 08:42:28AM +0100, Jiri Olsa wrote:

SNIP

> > 
> >  Performance counter stats for 'sleep 1' (5 runs):
> > 
> >           0.583178      task-clock (msec)         #    0.001 CPUs utilized
> >                  1      context-switches          #    0.002 M/sec
> >                  0      cpu-migrations            #    0.000 K/sec
> >                 67      page-faults               #    0.141 M/sec
> >          1,224,416      cycles                    #    2.585 GHz
> >    <not supported>      stalled-cycles-frontend
> >    <not supported>      stalled-cycles-backend
> >            892,568      instructions              #    0.68  insns per cycle
> >            184,975      branches                  #  390.554 M/sec
> >              8,512      branch-misses             #    4.57% of all branches
> > 
> >        1.000889249 seconds time elapsed                                          ( +-  0.01% )
> > 
> > I checked and current master in Linus' tree is also broken. Is this
> > change in documented perf stat behaviour intentional?
> 
> nope, not intentional.. I'll check on that, thanks for reporting

for some reason we initialized the stat every iteration,
(the call is also wrong because it's called only over the
first res_stats[0])

attached patch works for me, could you please test?
I'll run more tests and put it in my queue

thanks,
jirka


---
diff --git a/tools/perf/util/stat.c b/tools/perf/util/stat.c
index 2f901d15e063..2b58edccd56f 100644
--- a/tools/perf/util/stat.c
+++ b/tools/perf/util/stat.c
@@ -310,7 +310,6 @@ int perf_stat_process_counter(struct perf_stat_config *config,
 	int i, ret;
 
 	aggr->val = aggr->ena = aggr->run = 0;
-	init_stats(ps->res_stats);
 
 	if (counter->per_pkg)
 		zero_per_pkg(counter);

  reply	other threads:[~2016-01-19  8:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-18 17:59 perf stat stddev reporting broken since "perf stat: Introduce read_counters function" Mel Gorman
2016-01-19  7:42 ` Jiri Olsa
2016-01-19  8:16   ` Jiri Olsa [this message]
2016-01-19  9:38     ` Mel Gorman
2016-01-19  9:57       ` Jiri Olsa

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=20160119081623.GC20358@krava.brq.redhat.com \
    --to=jolsa@redhat.com \
    --cc=acme@redhat.com \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mgorman@techsingularity.net \
    /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 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.