aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2011-02-03 14:26:06 -0500
committerArnaldo Carvalho de Melo <acme@redhat.com>2011-02-03 14:26:06 -0500
commit52bcd9947bffae88bb1758f19277d678aaebc2ec (patch)
treee70cce3c65ce6a6cfa5daa802296dc1b25714b3f
parent542e72fc90f5ed9eecb574f80f70868c7f296093 (diff)
perf stat: Fix aggreate counter reading accounting
Introduced in: c52b12ed, when this sequence: count[0] = count[1] = count[2] = 0; Was replaced with: aggr->val = 0; Which is equivalent to zeroing just the first entry in the 'count' array. Fix it by zeroing the three entries with: aggr->val = aggr->ena = aggr->run = 0; Reported-by: Ingo Molnar <mingo@elte.hu> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Mike Galbraith <efault@gmx.de> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Cc: Tom Zanussi <tzanussi@gmail.com> LKML-Reference: <new-submission> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
-rw-r--r--tools/perf/util/evsel.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
index f5cfed60af98..d8575d31ee6c 100644
--- a/tools/perf/util/evsel.c
+++ b/tools/perf/util/evsel.c
@@ -90,7 +90,7 @@ int __perf_evsel__read(struct perf_evsel *evsel,
90 int cpu, thread; 90 int cpu, thread;
91 struct perf_counts_values *aggr = &evsel->counts->aggr, count; 91 struct perf_counts_values *aggr = &evsel->counts->aggr, count;
92 92
93 aggr->val = 0; 93 aggr->val = aggr->ena = aggr->run = 0;
94 94
95 for (cpu = 0; cpu < ncpus; cpu++) { 95 for (cpu = 0; cpu < ncpus; cpu++) {
96 for (thread = 0; thread < nthreads; thread++) { 96 for (thread = 0; thread < nthreads; thread++) {