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.
This commit is contained in:
Nilay Vaish 2013-12-03 10:51:40 -06:00
parent 5800e83223
commit 50d250f514

View file

@ -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 = []