diff options
author | Nathan Binkert <binkertn@umich.edu> | 2003-11-05 18:21:18 -0500 |
---|---|---|
committer | Nathan Binkert <binkertn@umich.edu> | 2003-11-05 18:21:18 -0500 |
commit | b064b8a6fda1dd3f1bd174d742cc8e452f714efe (patch) | |
tree | db54b441530115c9d1e20ebe929bb12de5252843 /sim/sim_object.hh | |
parent | 9471a4d20ffa98ae3f83edbe8cad1d282ab328af (diff) | |
download | gem5-b064b8a6fda1dd3f1bd174d742cc8e452f714efe.tar.xz |
Add a virtual function resetStats() that any SimObject can inherit
from that will get called any time stats are reset.
sim/sim_object.cc:
sim/sim_object.hh:
add a virtual function resetStats that any simObject can reset
when a statistics reset is initiated
--HG--
extra : convert_revision : fdad673142f6ff811f84c246d80e5d41e3c9d4d1
Diffstat (limited to 'sim/sim_object.hh')
-rw-r--r-- | sim/sim_object.hh | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sim/sim_object.hh b/sim/sim_object.hh index 1a365651b..6b26a1cb0 100644 --- a/sim/sim_object.hh +++ b/sim/sim_object.hh @@ -68,6 +68,7 @@ class SimObject : public Serializeable // register statistics for this object virtual void regStats(); virtual void regFormulas(); + virtual void resetStats(); // print extra results for this object not covered by registered // statistics (called at end of simulation) @@ -76,6 +77,9 @@ class SimObject : public Serializeable // static: call reg_stats on all SimObjects static void regAllStats(); + // static: call resetStats on all SimObjects + static void resetAllStats(); + // static: call printExtraOutput on all SimObjects static void printAllExtraOutput(std::ostream&); }; |