ruby: move stall and wakeup functions to AbstractController
[gem5.git] / src / cpu / inteltrace.hh
index 5d5bcda8ec4618603d1acadd440a536e4edf65c2..e5f88bf1a3f9a48228d1383ea400bb3da89062ea 100644 (file)
  *          Nathan Binkert
  */
 
-#ifndef __INTELTRACE_HH__
-#define __INTELTRACE_HH__
+#ifndef __CPU_INTELTRACE_HH__
+#define __CPU_INTELTRACE_HH__
 
 #include "base/trace.hh"
+#include "base/types.hh"
 #include "cpu/static_inst.hh"
+#include "cpu/thread_context.hh"
+#include "debug/ExecEnable.hh"
+#include "debug/ExecSpeculative.hh"
 #include "params/IntelTrace.hh"
-#include "sim/host.hh"
 #include "sim/insttracer.hh"
 
-class ThreadContext;
-
-
 namespace Trace {
 
 class IntelTraceRecord : public InstRecord
 {
   public:
     IntelTraceRecord(Tick _when, ThreadContext *_thread,
-               const StaticInstPtr &_staticInst, Addr _pc, bool spec)
-        : InstRecord(_when, _thread, _staticInst, _pc, spec)
+               const StaticInstPtr _staticInst, TheISA::PCState _pc,
+               bool spec, const StaticInstPtr _macroStaticInst = NULL)
+        : InstRecord(_when, _thread, _staticInst, _pc, spec,
+                _macroStaticInst)
     {
     }
 
@@ -64,22 +66,23 @@ class IntelTrace : public InstTracer
 
     IntelTraceRecord *
     getInstRecord(Tick when, ThreadContext *tc,
-            const StaticInstPtr staticInst, Addr pc)
+            const StaticInstPtr staticInst, TheISA::PCState pc,
+            const StaticInstPtr macroStaticInst = NULL)
     {
-        if (!IsOn(ExecEnable))
+        if (!Debug::ExecEnable)
             return NULL;
 
         if (!Trace::enabled)
             return NULL;
 
-        if (!IsOn(ExecSpeculative) && tc->misspeculating())
+        if (!Debug::ExecSpeculative && tc->misspeculating())
             return NULL;
 
         return new IntelTraceRecord(when, tc,
-                staticInst, pc, tc->misspeculating());
+                staticInst, pc, tc->misspeculating(), macroStaticInst);
     }
 };
 
-/* namespace Trace */ }
+} // namespace Trace
 
-#endif // __EXETRACE_HH__
+#endif // __CPU_INTELTRACE_HH__