g.second->resetStats();
}
+void
+Group::preDumpStats()
+{
+ for (auto &g : mergedStatGroups)
+ g->preDumpStats();
+
+ for (auto &g : statGroups)
+ g.second->preDumpStats();
+}
+
void
Group::addStat(Stats::Info *info)
{
*/
virtual void resetStats();
+ /**
+ * Callback before stats are dumped. This can be overridden by
+ * objects that need to perform calculations in addition to the
+ * capabiltiies implemented in the stat framework.
+ */
+ virtual void preDumpStats();
+
/**
* Register a stat with this group. This method is normally called
* automatically when a stat is instantiated.
# Only prepare stats the first time we dump them in the same tick.
if new_dump:
_m5.stats.processDumpQueue()
+ # Notify new-style stats group that we are about to dump stats.
+ sim_root = Root.getInstance()
+ if sim_root:
+ sim_root.preDumpStats();
prepare()
for output in outputList:
m, "Group")
.def("regStats", &Stats::Group::regStats)
.def("resetStats", &Stats::Group::resetStats)
+ .def("preDumpStats", &Stats::Group::preDumpStats)
.def("getStats", &Stats::Group::getStats)
.def("getStatGroups", &Stats::Group::getStatGroups)
.def("addStatGroup", &Stats::Group::addStatGroup)