summaryrefslogtreecommitdiff
path: root/src/python
diff options
context:
space:
mode:
authorMitchell Hayenga <Mitchell.Hayenga@ARM.com>2012-06-05 01:23:08 -0400
committerMitchell Hayenga <Mitchell.Hayenga@ARM.com>2012-06-05 01:23:08 -0400
commit8294d49bb6f787bbe5b05a4a5c52d1d26a2289af (patch)
treec3bca35253d157c9187167ddbdeed93a8dad70f2 /src/python
parent0b0c5621eea48a79d1d17e494fa99ea34ad8fad0 (diff)
downloadgem5-8294d49bb6f787bbe5b05a4a5c52d1d26a2289af.tar.xz
stats: Provide a mechanism to get a callback when stats are dumped.
This mechanism is useful for dumping output that is correlated with stats dumping, but isn't tracked by the gem5 statistics.
Diffstat (limited to 'src/python')
-rw-r--r--src/python/m5/stats/__init__.py2
-rw-r--r--src/python/swig/stats.i8
2 files changed, 10 insertions, 0 deletions
diff --git a/src/python/m5/stats/__init__.py b/src/python/m5/stats/__init__.py
index 1d7e3bc5d..765f9a634 100644
--- a/src/python/m5/stats/__init__.py
+++ b/src/python/m5/stats/__init__.py
@@ -103,6 +103,8 @@ def dump():
return
lastDump = curTick
+ internal.stats.processDumpQueue()
+
prepare()
for output in outputList:
diff --git a/src/python/swig/stats.i b/src/python/swig/stats.i
index 14a6966b1..5a6910fa6 100644
--- a/src/python/swig/stats.i
+++ b/src/python/swig/stats.i
@@ -71,6 +71,13 @@ processResetQueue()
resetQueue.process();
}
+inline void
+processDumpQueue()
+{
+ extern CallbackQueue dumpQueue;
+ dumpQueue.process();
+}
+
inline char *
PCC(const char *string)
{
@@ -146,6 +153,7 @@ void schedStatEvent(bool dump, bool reset,
Tick when = curTick(), Tick repeat = 0);
void processResetQueue();
+void processDumpQueue();
void enable();
bool enabled();