summaryrefslogtreecommitdiff
path: root/base/statistics.cc
diff options
context:
space:
mode:
authorLisa Hsu <hsul@eecs.umich.edu>2003-11-04 15:20:58 -0500
committerLisa Hsu <hsul@eecs.umich.edu>2003-11-04 15:20:58 -0500
commit8834d91f21562d01444421cc3eccca641bf100d0 (patch)
treec80ee408ee3ff8d140c7575355ac60a4bafd54f8 /base/statistics.cc
parent29474bdf027fe3396e0be2f6acbe2a6b89136bc2 (diff)
downloadgem5-8834d91f21562d01444421cc3eccca641bf100d0.tar.xz
statistics.cc:
on Database::reset(), reset all stats in every bin, not just current one. base/statistics.cc: on Database::reset(), reset all stats in every bin, not just current one. --HG-- extra : convert_revision : 0f3443b36ee00952810818a035c99267da8871d9
Diffstat (limited to 'base/statistics.cc')
-rw-r--r--base/statistics.cc9
1 files changed, 8 insertions, 1 deletions
diff --git a/base/statistics.cc b/base/statistics.cc
index c1a5b2626..14bdb32f6 100644
--- a/base/statistics.cc
+++ b/base/statistics.cc
@@ -250,12 +250,19 @@ Database::check()
void
Database::reset()
{
+ list<GenBin *>::iterator bi = bins.begin();
+ list<GenBin *>::iterator be = bins.end();
list_t::iterator i = allStats.begin();
list_t::iterator end = allStats.end();
- while (i != end) {
+ while (bi != be) {
+ (*bi)->activate();
+
+ while (i != end) {
(*i)->reset();
++i;
+ }
+ ++bi;
}
}