summaryrefslogtreecommitdiff
path: root/src/python/m5
diff options
context:
space:
mode:
Diffstat (limited to 'src/python/m5')
-rw-r--r--src/python/m5/simulate.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/python/m5/simulate.py b/src/python/m5/simulate.py
index e95136548..5fc00ad05 100644
--- a/src/python/m5/simulate.py
+++ b/src/python/m5/simulate.py
@@ -52,6 +52,7 @@ import SimObject
import ticks
import objects
from m5.util.dot_writer import do_dot
+from m5.internal.stats import updateEvents as updateStatEvents
from util import fatal
from util import attrdict
@@ -123,6 +124,10 @@ def instantiate(ckpt_dir=None):
else:
for obj in root.descendants(): obj.initState()
+ # Check to see if any of the stat events are in the past after resuming from
+ # a checkpoint, If so, this call will shift them to be at a valid time.
+ updateStatEvents()
+
# Reset to put the stats in a consistent state.
stats.reset()