Configs: Add support for the InOrder CPU model
[gem5.git] / src / cpu / exetrace.hh
index 76907d955a6f712e5e707666f29cd11047a53f8d..e49a2bb59ce3c3269c7e8b1280c1d5b0b94b0c01 100644 (file)
@@ -36,6 +36,7 @@
 #include "cpu/static_inst.hh"
 #include "sim/host.hh"
 #include "sim/insttracer.hh"
+#include "params/ExeTracer.hh"
 
 class ThreadContext;
 
@@ -46,24 +47,30 @@ class ExeTracerRecord : public InstRecord
 {
   public:
     ExeTracerRecord(Tick _when, ThreadContext *_thread,
-               const StaticInstPtr &_staticInst, Addr _pc, bool spec)
-        : InstRecord(_when, _thread, _staticInst, _pc, spec)
+               const StaticInstPtr _staticInst, Addr _pc, bool spec,
+               const StaticInstPtr _macroStaticInst = NULL, MicroPC _upc = 0)
+        : InstRecord(_when, _thread, _staticInst, _pc, spec,
+                _macroStaticInst, _upc)
     {
     }
 
+    void traceInst(StaticInstPtr inst, bool ran);
+
     void dump();
+    virtual void dumpTicks(std::ostream &outs);
 };
 
 class ExeTracer : public InstTracer
 {
   public:
-
-    ExeTracer(const std::string & name) : InstTracer(name)
+    typedef ExeTracerParams Params;
+    ExeTracer(const Params *params) : InstTracer(params)
     {}
 
     InstRecord *
     getInstRecord(Tick when, ThreadContext *tc,
-            const StaticInstPtr staticInst, Addr pc)
+            const StaticInstPtr staticInst, Addr pc,
+            const StaticInstPtr macroStaticInst = NULL, MicroPC upc = 0)
     {
         if (!IsOn(ExecEnable))
             return NULL;
@@ -75,7 +82,7 @@ class ExeTracer : public InstTracer
             return NULL;
 
         return new ExeTracerRecord(when, tc,
-                staticInst, pc, tc->misspeculating());
+                staticInst, pc, tc->misspeculating(), macroStaticInst, upc);
     }
 };