summaryrefslogtreecommitdiff
path: root/src/sim
diff options
context:
space:
mode:
Diffstat (limited to 'src/sim')
-rw-r--r--src/sim/sim_object.cc17
-rw-r--r--src/sim/sim_object.hh14
2 files changed, 6 insertions, 25 deletions
diff --git a/src/sim/sim_object.cc b/src/sim/sim_object.cc
index 7b794a0b7..eb6e15ae1 100644
--- a/src/sim/sim_object.cc
+++ b/src/sim/sim_object.cc
@@ -56,7 +56,9 @@ SimObject::SimObjectList SimObject::simObjectList;
// SimObject constructor: used to maintain static simObjectList
//
SimObject::SimObject(const Params *p)
- : EventManager(getEventQueue(p->eventq_index)), _params(p)
+ : EventManager(getEventQueue(p->eventq_index)),
+ Stats::Group(nullptr),
+ _params(p)
{
#ifdef DEBUG
doDebugBreak = false;
@@ -98,19 +100,6 @@ SimObject::startup()
{
}
-//
-// no default statistics, so nothing to do in base implementation
-//
-void
-SimObject::regStats()
-{
-}
-
-void
-SimObject::resetStats()
-{
-}
-
/**
* No probe points by default, so do nothing in base.
*/
diff --git a/src/sim/sim_object.hh b/src/sim/sim_object.hh
index 5c9bf0019..c938ba5e5 100644
--- a/src/sim/sim_object.hh
+++ b/src/sim/sim_object.hh
@@ -52,6 +52,7 @@
#include <string>
#include <vector>
+#include "base/stats/group.hh"
#include "params/SimObject.hh"
#include "sim/drain.hh"
#include "sim/eventq.hh"
@@ -92,7 +93,8 @@ class ProbeManager;
* SimObject.py). This has the effect of calling the method on the
* parent node <i>before</i> its children.
*/
-class SimObject : public EventManager, public Serializable, public Drainable
+class SimObject : public EventManager, public Serializable, public Drainable,
+ public Stats::Group
{
private:
typedef std::vector<SimObject *> SimObjectList;
@@ -146,16 +148,6 @@ class SimObject : public EventManager, public Serializable, public Drainable
virtual void initState();
/**
- * Register statistics for this object.
- */
- virtual void regStats();
-
- /**
- * Reset statistics associated with this object.
- */
- virtual void resetStats();
-
- /**
* Register probe points for this object.
*/
virtual void regProbePoints();