summaryrefslogtreecommitdiff
path: root/src/python/swig
diff options
context:
space:
mode:
authorSascha Bischoff <sascha.bischoff@arm.com>2012-09-25 11:49:41 -0500
committerSascha Bischoff <sascha.bischoff@arm.com>2012-09-25 11:49:41 -0500
commit74ab69c7eafc2f0d187ce3ba7d6b9a59ba291b9f (patch)
treee5165b40b79f8cab3fbee6293b4a976f8ba44bc4 /src/python/swig
parentacbb7a2eed15258061e038254469197ae3831165 (diff)
downloadgem5-74ab69c7eafc2f0d187ce3ba7d6b9a59ba291b9f.tar.xz
Statistics: Add a function to configure periodic stats dumping
This patch adds a function, periodicStatDump(long long period), which will dump and reset the statistics every period. This function is designed to be called from the python configuration scripts. This allows the periodic stats dumping to be configured more easilly at run time. The period is currently specified as a long long as there are issues passing Tick into the C++ from the python as they have conflicting definitions. If the period is less than curTick, the first occurance occurs at curTick. If the period is set to 0, then the event is descheduled and the stats are not periodically dumped. Due to issues when resumung from a checkpoint, the StatDump event must be moved forward such that it occues AFTER the current tick. As the function is called from the python, the event is scheduled before the system resumes from the checkpoint. Therefore, the event is moved using the updateEvents() function. This is called from simulate.py once the system has resumed from the checkpoint. NOTE: It should be noted that this is a fairly temporary patch which re-adds the capability to extract temporal information from the communication monitors. It should not be used at the same time as anything that relies on dumping the statistics based on in simulation events i.e. a context switch.
Diffstat (limited to 'src/python/swig')
-rw-r--r--src/python/swig/stats.i4
1 files changed, 4 insertions, 0 deletions
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();