summaryrefslogtreecommitdiff
path: root/src/base/statistics.cc
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/base/statistics.cc
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/base/statistics.cc')
-rw-r--r--src/base/statistics.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/base/statistics.cc b/src/base/statistics.cc
index 545d08cab..8034625be 100644
--- a/src/base/statistics.cc
+++ b/src/base/statistics.cc
@@ -433,6 +433,7 @@ Formula::str() const
return root ? root->str() : "";
}
+CallbackQueue dumpQueue;
CallbackQueue resetQueue;
void
@@ -458,6 +459,12 @@ enable()
_enabled = true;
}
+void
+registerDumpCallback(Callback *cb)
+{
+ dumpQueue.add(cb);
+}
+
} // namespace Stats
void