diff options
author | Steve Reinhardt <steve.reinhardt@amd.com> | 2010-08-17 05:08:50 -0700 |
---|---|---|
committer | Steve Reinhardt <steve.reinhardt@amd.com> | 2010-08-17 05:08:50 -0700 |
commit | 5ea906ba1625266ee80968d70e0c218adedcce9f (patch) | |
tree | a28387572527f0dac40d677a8320b797dcc2a137 /src/python/m5/stats.py | |
parent | c2cce96a0bb4878a9e6a4ae635096b5ce62e41c3 (diff) | |
download | gem5-5ea906ba1625266ee80968d70e0c218adedcce9f.tar.xz |
sim: move iterating over SimObjects into Python.
Diffstat (limited to 'src/python/m5/stats.py')
-rw-r--r-- | src/python/m5/stats.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/python/m5/stats.py b/src/python/m5/stats.py index 40a49b001..76729d5ee 100644 --- a/src/python/m5/stats.py +++ b/src/python/m5/stats.py @@ -29,6 +29,7 @@ import internal from internal.stats import StatEvent as event +from objects import Root def initText(filename, desc=True): internal.stats.initText(filename, desc) @@ -56,4 +57,8 @@ def dump(): internal.stats.dump() def reset(): + # call reset stats on all SimObjects + root = Root.getInstance() + for obj in root.descendants(): obj.resetStats() + # call any other registered stats reset callbacks internal.stats.reset() |