summaryrefslogtreecommitdiff
path: root/base/statistics.hh
diff options
context:
space:
mode:
authorLisa Hsu <hsul@eecs.umich.edu>2003-11-04 15:15:24 -0500
committerLisa Hsu <hsul@eecs.umich.edu>2003-11-04 15:15:24 -0500
commit553df008cfec3f4a0bd86c8e5730bde544c26e3d (patch)
tree097b7d4c265beaba027ff490b04d63347a42c336 /base/statistics.hh
parenta7635fa6ef488b8e44b127c40ab2a6818620145e (diff)
parent921b1ee87b6927e7310c747e03efd223d8c65642 (diff)
downloadgem5-553df008cfec3f4a0bd86c8e5730bde544c26e3d.tar.xz
Merge zizzer:/bk/m5 into zower.eecs.umich.edu:/z/hsul/bk/clean
--HG-- extra : convert_revision : 0074df284e85bc2ebe6ccc2dbe765fabda9ab041
Diffstat (limited to 'base/statistics.hh')
-rw-r--r--base/statistics.hh16
1 files changed, 14 insertions, 2 deletions
diff --git a/base/statistics.hh b/base/statistics.hh
index 2fe6988b0..aa3489727 100644
--- a/base/statistics.hh
+++ b/base/statistics.hh
@@ -60,6 +60,9 @@
#include <math.h>
#include "sim/host.hh"
+#ifdef FS_MEASURE
+#include "base/trace.hh"
+#endif
//
// Un-comment this to enable weirdo-stat debugging
//
@@ -2167,6 +2170,7 @@ class GenBin : public Detail::BinBase
virtual ~GenBin() {};
virtual void activate() = 0;
+ virtual std::string name() const = 0;
void regBin(GenBin *bin, std::string name);
};
@@ -2198,7 +2202,6 @@ struct StatBin : public GenBin
// That one is for the last trailing flags byte.
offset() += (size + 1 + mask) & ~mask;
-
return off;
}
@@ -2212,7 +2215,12 @@ struct StatBin : public GenBin
return Detail::BinBase::memory() + off;
}
- virtual void activate() { setCurBin(this); }
+ virtual void activate() {
+ setCurBin(this);
+#ifdef FS_MEASURE
+ DPRINTF(TCPIP, "activating %s Bin\n", name());
+#endif
+ }
static void activate(StatBin &bin) { setCurBin(&bin); }
class BinBase
@@ -2426,7 +2434,11 @@ struct NoBin
* is NoBin, nothing is binned. If it is MainBin (or whatever *Bin), then all stats are binned
* under that Bin.
*/
+#ifdef FS_MEASURE
+typedef MainBin DefaultBin;
+#else
typedef NoBin DefaultBin;
+#endif
/**
* This is a simple scalar statistic, like a counter.