stats: allow stats to be reset even if no objects have been instantiated

This commit is contained in:
Nathan Binkert 2010-12-21 08:02:41 -08:00
parent c24f1df343
commit 88033eb608

View file

@ -59,6 +59,8 @@ def dump():
def reset():
# call reset stats on all SimObjects
root = Root.getInstance()
if root:
for obj in root.descendants(): obj.resetStats()
# call any other registered stats reset callbacks
internal.stats.reset()