projects
/
gem5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c24f1df
)
stats: allow stats to be reset even if no objects have been instantiated
author
Nathan Binkert
<nate@binkert.org>
Tue, 21 Dec 2010 16:02:41 +0000
(08:02 -0800)
committer
Nathan Binkert
<nate@binkert.org>
Tue, 21 Dec 2010 16:02:41 +0000
(08:02 -0800)
src/python/m5/stats.py
patch
|
blob
|
history
diff --git
a/src/python/m5/stats.py
b/src/python/m5/stats.py
index 76729d5ee42a5b9c772df02320a52dda15bd6cb0..907fad5319c6d7607a190bec91b75dc3d37de03f 100644
(file)
--- 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()