summaryrefslogtreecommitdiff
path: root/src/base/statistics.hh
diff options
context:
space:
mode:
authorNathan Binkert <nate@binkert.org>2009-03-07 14:30:53 -0800
committerNathan Binkert <nate@binkert.org>2009-03-07 14:30:53 -0800
commitfcaf1b74b0b4b40891a71b3b8bccd3f173aeff56 (patch)
treee240814436ad059707d0f7e008d5d4bdfedd1087 /src/base/statistics.hh
parentbe2d74a25afad22f2c6da97aba0a45c492d779e1 (diff)
downloadgem5-fcaf1b74b0b4b40891a71b3b8bccd3f173aeff56.tar.xz
stats: cleanup text output stuff and fix mysql output
Diffstat (limited to 'src/base/statistics.hh')
-rw-r--r--src/base/statistics.hh39
1 files changed, 23 insertions, 16 deletions
diff --git a/src/base/statistics.hh b/src/base/statistics.hh
index 827c1d311..06c15a77d 100644
--- a/src/base/statistics.hh
+++ b/src/base/statistics.hh
@@ -1423,6 +1423,22 @@ class Vector2dBase : public DataWrapVec2d<Derived, Vector2dInfo>
//
//////////////////////////////////////////////////////////////////////
+struct DistParams : public StorageParams
+{
+ const bool fancy;
+
+ /** The minimum value to track. */
+ Counter min;
+ /** The maximum value to track. */
+ Counter max;
+ /** The number of entries in each bucket. */
+ Counter bucket_size;
+ /** The number of buckets. Equal to (max-min)/bucket_size. */
+ size_type buckets;
+
+ explicit DistParams(bool f) : fancy(f) {}
+};
+
/**
* Templatized storage and interface for a distrbution stat.
*/
@@ -1430,18 +1446,9 @@ class DistStor
{
public:
/** The parameters for a distribution stat. */
- struct Params : public StorageParams
- {
- /** The minimum value to track. */
- Counter min;
- /** The maximum value to track. */
- Counter max;
- /** The number of entries in each bucket. */
- Counter bucket_size;
- /** The number of buckets. Equal to (max-min)/bucket_size. */
- size_type buckets;
-
- enum { fancy = false };
+ struct Params : public DistParams
+ {
+ Params() : DistParams(false) {}
};
private:
@@ -1578,9 +1585,9 @@ class DistStor
class FancyStor
{
public:
- struct Params : public StorageParams
+ struct Params : public DistParams
{
- enum { fancy = true };
+ Params() : DistParams(true) {}
};
private:
@@ -1654,9 +1661,9 @@ class FancyStor
class AvgFancy
{
public:
- struct Params : public StorageParams
+ struct Params : public DistParams
{
- enum { fancy = true };
+ Params() : DistParams(true) {}
};
private: