summaryrefslogtreecommitdiff
path: root/src/python
diff options
context:
space:
mode:
authorNilay Vaish <nilay@cs.wisc.edu>2013-12-03 10:51:40 -0600
committerNilay Vaish <nilay@cs.wisc.edu>2013-12-03 10:51:40 -0600
commit50d250f514f7031e7e544e69141fad7a1b000257 (patch)
tree9a51cf8ea776f86d2c15f7aa8a2adac2c2a62786 /src/python
parent5800e832235e611a843e10cead23b1b035e88916 (diff)
downloadgem5-50d250f514f7031e7e544e69141fad7a1b000257.tar.xz
sim: reset stats after startup
Currently statistics are reset after the initial / checkpoint state has been loaded. But ruby does some checkpoint processing in its startup() function. So the stats need to be reset after the startup() function has been called. This patch moves the class to stats.reset() to achieve this change in functionality.
Diffstat (limited to 'src/python')
-rw-r--r--src/python/m5/simulate.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/python/m5/simulate.py b/src/python/m5/simulate.py
index cbd0fb0d4..7d443b1db 100644
--- a/src/python/m5/simulate.py
+++ b/src/python/m5/simulate.py
@@ -134,9 +134,6 @@ def instantiate(ckpt_dir=None):
# 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()
-
need_resume = []
need_startup = True
def simulate(*args, **kwargs):
@@ -154,6 +151,9 @@ def simulate(*args, **kwargs):
# register our C++ exit callback function with Python
atexit.register(internal.core.doExitCleanup)
+ # Reset to put the stats in a consistent state.
+ stats.reset()
+
for root in need_resume:
resume(root)
need_resume = []