diff options
author | Nathan Binkert <binkertn@umich.edu> | 2004-02-25 16:12:48 -0500 |
---|---|---|
committer | Nathan Binkert <binkertn@umich.edu> | 2004-02-25 16:12:48 -0500 |
commit | b678152277d5f876efcf7bcac99926a977fdccac (patch) | |
tree | b6a10b28c86f1604b4aa16a3ee283f529f93f6d5 /base/statistics.cc | |
parent | 6d574e9cff50e7c6bacd6f3d16e84810c88a2647 (diff) | |
download | gem5-b678152277d5f876efcf7bcac99926a977fdccac.tar.xz |
Fix stats debugging and always compile it in for the
debug target
--HG--
extra : convert_revision : aa16e6256a056e6df9affec6fd973e62e812e23c
Diffstat (limited to 'base/statistics.cc')
-rw-r--r-- | base/statistics.cc | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/base/statistics.cc b/base/statistics.cc index 49294ad27..dce545f18 100644 --- a/base/statistics.cc +++ b/base/statistics.cc @@ -57,7 +57,7 @@ __nan() } #endif -#ifdef STAT_DEBUG +#ifdef DEBUG static int total_stats = 0; #endif @@ -409,6 +409,14 @@ DataAccess::setPrint() Database::StatDB().regPrint(this); } +StatData::StatData() + : flags(none), precision(-1), prereq(0) +{ +#ifdef DEBUG + number = total_stats++; +#endif +} + StatData::~StatData() { } @@ -443,8 +451,8 @@ bool StatData::baseCheck() const { if (!(flags & init)) { -#ifdef STAT_DEBUG - cprintf("this is stat number %d\n",(*i)->number); +#ifdef DEBUG + cprintf("this is stat number %d\n", number); #endif panic("Not all stats have been initialized"); return false; |