diff options
Diffstat (limited to 'src/python')
-rw-r--r-- | src/python/m5/simulate.py | 5 | ||||
-rw-r--r-- | src/python/swig/stats.i | 4 |
2 files changed, 9 insertions, 0 deletions
diff --git a/src/python/m5/simulate.py b/src/python/m5/simulate.py index e95136548..5fc00ad05 100644 --- a/src/python/m5/simulate.py +++ b/src/python/m5/simulate.py @@ -52,6 +52,7 @@ import SimObject import ticks import objects from m5.util.dot_writer import do_dot +from m5.internal.stats import updateEvents as updateStatEvents from util import fatal from util import attrdict @@ -123,6 +124,10 @@ def instantiate(ckpt_dir=None): else: for obj in root.descendants(): obj.initState() + # Check to see if any of the stat events are in the past after resuming from + # a checkpoint, If so, this call will shift them to be at a valid time. + updateStatEvents() + # Reset to put the stats in a consistent state. stats.reset() diff --git a/src/python/swig/stats.i b/src/python/swig/stats.i index 5a6910fa6..46395eb22 100644 --- a/src/python/swig/stats.i +++ b/src/python/swig/stats.i @@ -152,6 +152,10 @@ Output *initText(const std::string &filename, bool desc); void schedStatEvent(bool dump, bool reset, Tick when = curTick(), Tick repeat = 0); +void periodicStatDump(long long period = 0); + +void updateEvents(); + void processResetQueue(); void processDumpQueue(); void enable(); |