From: Lisa Hsu Date: Fri, 31 Oct 2003 05:23:53 +0000 (-0500) Subject: I forgot - also to typedef the default type of bin choice given to every visible... X-Git-Tag: m5_1.0_beta2~310 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b5fc3af142cfe71e6cb331dbed3b177193553a58;p=gem5.git I forgot - also to typedef the default type of bin choice given to every visible stat type (NoBin or BinType). this way a little #define does it all for you. statistics.hh: add #includes needed for CeilPow2 statistics.cc: rm unneeded #includes for CeilPow2 base/statistics.cc: rm unneeded #includes for CeilPow2 base/statistics.hh: add #includes needed for CeilPow2 --HG-- extra : convert_revision : 818028b276e97735a8b8d21d6514f41a80350514 --- diff --git a/base/statistics.cc b/base/statistics.cc index 184fa67a9..8b2d8e5de 100644 --- a/base/statistics.cc +++ b/base/statistics.cc @@ -33,11 +33,8 @@ #include #include -#include - #include "base/callback.hh" #include "base/cprintf.hh" -#include "base/intmath.hh" #include "base/misc.hh" #include "base/statistics.hh" #include "base/str.hh" diff --git a/base/statistics.hh b/base/statistics.hh index 98df8d55e..056adea57 100644 --- a/base/statistics.hh +++ b/base/statistics.hh @@ -56,7 +56,8 @@ #include "base/refcnt.hh" #include "base/str.hh" - +#include "base/intmath.hh" +#include #include "sim/host.hh" // @@ -2419,11 +2420,18 @@ struct NoBin * @{ */ +/** + * This is an easy way to assign all your stats to be binned or not binned. If the typedef + * is NoBin, nothing is binned. If it is MainBin (or whatever *Bin), then all stats are binned + * under that Bin. + */ +typedef NoBin DefaultBin; + /** * This is a simple scalar statistic, like a counter. * @sa Stat, ScalarBase, StatStor */ -template +template class Scalar : public Detail::ScalarBase { public: @@ -2443,7 +2451,7 @@ class Scalar : public Detail::ScalarBase * A stat that calculates the per cycle average of a value. * @sa Stat, ScalarBase, AvgStor */ -template +template class Average : public Detail::ScalarBase { public: @@ -2463,7 +2471,7 @@ class Average : public Detail::ScalarBase * A vector of scalar stats. * @sa Stat, VectorBase, StatStor */ -template +template class Vector : public Detail::VectorBase { }; @@ -2471,7 +2479,7 @@ class Vector : public Detail::VectorBase * A vector of Average stats. * @sa Stat, VectorBase, AvgStor */ -template +template class AverageVector : public Detail::VectorBase { }; @@ -2479,7 +2487,7 @@ class AverageVector : public Detail::VectorBase * A 2-Dimensional vecto of scalar stats. * @sa Stat, Vector2dBase, StatStor */ -template +template class Vector2d : public Detail::Vector2dBase { }; @@ -2487,7 +2495,7 @@ class Vector2d : public Detail::Vector2dBase * A simple distribution stat. * @sa Stat, DistBase, DistStor */ -template +template class Distribution : public Detail::DistBase { private: @@ -2520,7 +2528,7 @@ class Distribution : public Detail::DistBase * Calculates the mean and variance of all the samples. * @sa Stat, DistBase, FancyStor */ -template +template class StandardDeviation : public Detail::DistBase { private: @@ -2543,7 +2551,7 @@ class StandardDeviation : public Detail::DistBase * Calculates the per cycle mean and variance of the samples. * @sa Stat, DistBase, AvgFancy */ -template +template class AverageDeviation : public Detail::DistBase { private: @@ -2566,7 +2574,7 @@ class AverageDeviation : public Detail::DistBase * A vector of distributions. * @sa Stat, VectorDistBase, DistStor */ -template +template class VectorDistribution : public Detail::VectorDistBase { @@ -2601,7 +2609,7 @@ class VectorDistribution * This is a vector of StandardDeviation stats. * @sa Stat, VectorDistBase, FancyStor */ -template +template class VectorStandardDeviation : public Detail::VectorDistBase { @@ -2629,7 +2637,7 @@ class VectorStandardDeviation * This is a vector of AverageDeviation stats. * @sa Stat, VectorDistBase, AvgFancy */ -template +template class VectorAverageDeviation : public Detail::VectorDistBase {