syscall emulation: fix fast build issue
[gem5.git] / src / sim / sim_object.cc
index 95bc6bf8466f8052577f2f34201600df5f44531d..44d498c3c2c8ee131e447cc254a36047abeb6f32 100644 (file)
@@ -39,6 +39,7 @@
 #include "base/trace.hh"
 #include "base/types.hh"
 #include "debug/Checkpoint.hh"
+#include "sim/probe/probe.hh"
 #include "sim/sim_object.hh"
 #include "sim/stats.hh"
 
@@ -60,14 +61,13 @@ SimObject::SimObjectList SimObject::simObjectList;
 // SimObject constructor: used to maintain static simObjectList
 //
 SimObject::SimObject(const Params *p)
-    : EventManager(p->eventq), _params(p)
+    : EventManager(getEventQueue(p->eventq_index)), _params(p)
 {
 #ifdef DEBUG
     doDebugBreak = false;
 #endif
-
     simObjectList.push_back(this);
-    state = Running;
+    probeManager = new ProbeManager(this);
 }
 
 void
@@ -105,20 +105,37 @@ SimObject::regStats()
 }
 
 void
-SimObject::regFormulas()
+SimObject::resetStats()
 {
 }
 
+/**
+ * No probe points by default, so do nothing in base.
+ */
 void
-SimObject::resetStats()
+SimObject::regProbePoints()
+{
+}
+
+/**
+ * No probe listeners by default, so do nothing in base.
+ */
+void
+SimObject::regProbeListeners()
 {
 }
 
+ProbeManager *
+SimObject::getProbeManager()
+{
+    return probeManager;
+}
+
 //
 // static function: serialize all SimObjects.
 //
 void
-SimObject::serializeAll(ostream &os)
+SimObject::serializeAll(std::ostream &os)
 {
     SimObjectList::reverse_iterator ri = simObjectList.rbegin();
     SimObjectList::reverse_iterator rend = simObjectList.rend();
@@ -156,36 +173,12 @@ debugObjectBreak(const char *objs)
 #endif
 
 unsigned int
-SimObject::drain(Event *drain_event)
+SimObject::drain(DrainManager *drain_manager)
 {
-    state = Drained;
+    setDrainState(Drained);
     return 0;
 }
 
-void
-SimObject::resume()
-{
-    state = Running;
-}
-
-void
-SimObject::setMemoryMode(Enums::MemoryMode new_mode)
-{
-    panic("setMemoryMode() should only be called on systems");
-}
-
-void
-SimObject::switchOut()
-{
-    panic("Unimplemented!");
-}
-
-void
-SimObject::takeOverFrom(BaseCPU *cpu)
-{
-    panic("Unimplemented!");
-}
-
 
 SimObject *
 SimObject::find(const char *name)