From: Nathan Binkert Date: Mon, 10 Jan 2011 19:11:16 +0000 (-0800) Subject: stats: fix the distribution stat X-Git-Tag: stable_2012_02_02~667 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ff592e0ed1d03609a3e0d8dee9a4fc83a3d8e807;p=gem5.git stats: fix the distribution stat --- diff --git a/src/base/statistics.hh b/src/base/statistics.hh index 9c10164a9..529871dc4 100644 --- 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; }