diff options
author | Nathan Binkert <nate@binkert.org> | 2010-12-21 08:02:41 -0800 |
---|---|---|
committer | Nathan Binkert <nate@binkert.org> | 2010-12-21 08:02:41 -0800 |
commit | 88033eb608ee5835875e70c7e9797b23f9de9103 (patch) | |
tree | e4088879a0a0a0fbb8cb9e6accdd9c7b85a239df /src/python | |
parent | c24f1df343172174fbdeda5a983fa0a5791de8aa (diff) | |
download | gem5-88033eb608ee5835875e70c7e9797b23f9de9103.tar.xz |
stats: allow stats to be reset even if no objects have been instantiated
Diffstat (limited to 'src/python')
-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() |