This mechanism is useful for dumping output that is correlated with stats
dumping, but isn't tracked by the gem5 statistics.
return root ? root->str() : "";
}
+CallbackQueue dumpQueue;
CallbackQueue resetQueue;
void
_enabled = true;
}
+void
+registerDumpCallback(Callback *cb)
+{
+ dumpQueue.add(cb);
+}
+
} // namespace Stats
void
*/
void registerResetCallback(Callback *cb);
+/**
+ * Register a callback that should be called whenever statistics are
+ * about to be dumped
+ */
+void registerDumpCallback(Callback *cb);
+
std::list<Info *> &statsList();
} // namespace Stats
return
lastDump = curTick
+ internal.stats.processDumpQueue()
+
prepare()
for output in outputList:
resetQueue.process();
}
+inline void
+processDumpQueue()
+{
+ extern CallbackQueue dumpQueue;
+ dumpQueue.process();
+}
+
inline char *
PCC(const char *string)
{
Tick when = curTick(), Tick repeat = 0);
void processResetQueue();
+void processDumpQueue();
void enable();
bool enabled();