diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/python/m5/stats.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/python/m5/stats.py b/src/python/m5/stats.py index 76729d5ee..907fad531 100644 --- a/src/python/m5/stats.py +++ b/src/python/m5/stats.py @@ -59,6 +59,8 @@ def dump(): def reset(): # call reset stats on all SimObjects root = Root.getInstance() - for obj in root.descendants(): obj.resetStats() + if root: + for obj in root.descendants(): obj.resetStats() + # call any other registered stats reset callbacks internal.stats.reset() |