summaryrefslogtreecommitdiff
path: root/base/statistics.cc
diff options
context:
space:
mode:
authorNathan Binkert <binkertn@umich.edu>2003-11-06 00:41:14 -0500
committerNathan Binkert <binkertn@umich.edu>2003-11-06 00:41:14 -0500
commit655e9ef3de65ce71f63fce23152de862994c38f3 (patch)
tree2dcf58807391d686bf38a600aeffd2fc1c290bd0 /base/statistics.cc
parent22658f20987208463bd1f8c2ba88f59374dcca66 (diff)
downloadgem5-655e9ef3de65ce71f63fce23152de862994c38f3.tar.xz
Little fixes to make more of the stats reset correctly.
base/statistics.cc: formatting cpu/simple_cpu/simple_cpu.cc: cpu/simple_cpu/simple_cpu.hh: Make numInsts reset by adding a resetStats function sim/sim_object.cc: Register the reset callback in a slightly cleaner way to avoid potential static member constructor ordering issues --HG-- extra : convert_revision : 408073b4b0397fbf9dfd9c548a313f1c8c3fc031
Diffstat (limited to 'base/statistics.cc')
-rw-r--r--base/statistics.cc25
1 files changed, 12 insertions, 13 deletions
diff --git a/base/statistics.cc b/base/statistics.cc
index 1ffbeb690..3af764609 100644
--- a/base/statistics.cc
+++ b/base/statistics.cc
@@ -160,7 +160,6 @@ Database::~Database()
void
Database::dump(ostream &stream)
{
-
#ifndef FS_MEASURE
list_t::iterator i = printStats.begin();
list_t::iterator end = printStats.end();
@@ -179,7 +178,7 @@ Database::dump(ostream &stream)
ccprintf(stream, "PRINTING BINNED STATS\n");
while (j != bins_end) {
(*j)->activate();
- map<const GenBin *, std::string>::const_iterator iter;
+ map<const GenBin *, std::string>::const_iterator iter;
iter = bin_names.find(*j);
if (iter == bin_names.end())
panic("a binned stat not found in names map!");
@@ -187,19 +186,19 @@ Database::dump(ostream &stream)
#ifdef FS_MEASURE
list_t::iterator i = printStats.begin();
- list_t::iterator end = printStats.end();
+ list_t::iterator end = printStats.end();
#else
- list_t::iterator i = binnedStats.begin();
- list_t::iterator end = binnedStats.end();
+ list_t::iterator i = binnedStats.begin();
+ list_t::iterator end = binnedStats.end();
#endif
- while (i != end) {
- Stat *stat = *i;
- if (stat->dodisplay())
- stat->display(stream);
- ++i;
- }
- ++j;
- ccprintf(stream, "---------------------------------\n");
+ while (i != end) {
+ Stat *stat = *i;
+ if (stat->dodisplay())
+ stat->display(stream);
+ ++i;
+ }
+ ++j;
+ ccprintf(stream, "---------------------------------\n");
}
#ifndef FS_MEASURE
ccprintf(stream, "**************ALL STATS************\n");