projects
/
gem5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fcc621a
)
stats: fix the distribution stat
author
Nathan Binkert
<nate@binkert.org>
Mon, 10 Jan 2011 19:11:16 +0000
(11:11 -0800)
committer
Nathan Binkert
<nate@binkert.org>
Mon, 10 Jan 2011 19:11:16 +0000
(11:11 -0800)
src/base/statistics.hh
patch
|
blob
|
history
diff --git
a/src/base/statistics.hh
b/src/base/statistics.hh
index 9c10164a9c228b32247556661202e349c95812b1..529871dc4f6ece4cd1754fe156c570f6dabc5220 100644
(file)
--- a/
src/base/statistics.hh
+++ b/
src/base/statistics.hh
@@
-1361,9
+1361,8
@@
class DistStor
if (val > max_val)
max_val = val;
- Counter sample = val * number;
- sum += sample;
- squares += sample * sample;
+ sum += val * number;
+ squares += val * val * number;
samples += number;
}