changeset 4a3bddd74f36 in /z/repo/m5
details: http://repo.m5sim.org/m5?cmd=changeset;node=4a3bddd74f36
description:
        stats: allow stats to be reset even if no objects have been instantiated

diffstat:

 src/python/m5/stats.py |  4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diffs (13 lines):

diff -r f71f9634d809 -r 4a3bddd74f36 src/python/m5/stats.py
--- a/src/python/m5/stats.py    Tue Dec 21 08:02:40 2010 -0800
+++ b/src/python/m5/stats.py    Tue Dec 21 08:02:41 2010 -0800
@@ -59,6 +59,8 @@
 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()
_______________________________________________
m5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/m5-dev

Reply via email to