diff -r cc5797147e1c -r 112a9778300a src/python/m5/simulate.py --- a/src/python/m5/simulate.py Mon Sep 09 18:52:23 2013 -0500 +++ b/src/python/m5/simulate.py Mon Sep 09 19:35:06 2013 -0500 @@ -134,19 +134,22 @@ # 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 +need_stats_reset = True def simulate(*args, **kwargs): - global need_resume, need_startup + global need_resume, need_startup, need_stats_reset if need_startup: root = objects.Root.getInstance() for obj in root.descendants(): obj.startup() need_startup = False + if need_stats_reset: + # Reset to put the stats in a consistent state. + stats.reset() + need_stats_reset = False + for root in need_resume: resume(root) need_resume = []