From 50d250f514f7031e7e544e69141fad7a1b000257 Mon Sep 17 00:00:00 2001 From: Nilay Vaish Date: Tue, 3 Dec 2013 10:51:40 -0600 Subject: 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. --- src/python/m5/simulate.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/python/m5') 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 = [] -- cgit v1.2.3