save and restore the current bin during reset since we
authorNathan Binkert <binkertn@umich.edu>
Fri, 7 Nov 2003 06:24:49 +0000 (01:24 -0500)
committerNathan Binkert <binkertn@umich.edu>
Fri, 7 Nov 2003 06:24:49 +0000 (01:24 -0500)
should continue in whatever bin we were in.

--HG--
extra : convert_revision : 30a891ccb03afa0c1dd0c98942ab3ea5ba800660

base/statistics.cc

index 3af764609d2aac0ea40278d768970526b8b265b9..cc7d60b0ba12f6a9dabdc2535c7f2a31c992bead 100644 (file)
@@ -272,6 +272,8 @@ Database::reset()
         ++i;
     }
 
+    MainBin *orig = MainBin::current();
+
     list<GenBin *>::iterator bi = bins.begin();
     list<GenBin *>::iterator be = bins.end();
     while (bi != be) {
@@ -286,6 +288,8 @@ Database::reset()
         }
         ++bi;
     }
+
+    orig->activate();
 }
 
 void