cpu: Remove the "SingleThreaded" fetch policy from the O3 CPU.
[gem5.git] / src / cpu / inteltrace.hh
index 21afe0fc0752807dc17f46a10d62765bf5195d3f..ef268edd11e223c485783ab93409fe02786234af 100644 (file)
  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * Authors: Steve Reinhardt
- *          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 "sim/host.hh"
+#include "cpu/thread_context.hh"
+#include "debug/ExecEnable.hh"
+#include "params/IntelTrace.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,
+               const StaticInstPtr _macroStaticInst = NULL)
+        : InstRecord(_when, _thread, _staticInst, _pc,
+                _macroStaticInst)
     {
     }
 
@@ -58,27 +57,21 @@ class IntelTrace : public InstTracer
 {
   public:
 
-    IntelTrace(const std::string & name) : InstTracer(name)
+    IntelTrace(const IntelTraceParams *p) : InstTracer(p)
     {}
 
     IntelTraceRecord *
     getInstRecord(Tick when, ThreadContext *tc,
-            const StaticInstPtr staticInst, Addr pc)
+            const StaticInstPtr staticInst, TheISA::PCState pc,
+            const StaticInstPtr macroStaticInst = NULL)
     {
-        if (!IsOn(ExecEnable))
-            return NULL;
-
-        if (!Trace::enabled)
-            return NULL;
-
-        if (!IsOn(ExecSpeculative) && tc->misspeculating())
+        if (!Debug::ExecEnable)
             return NULL;
 
-        return new IntelTraceRecord(when, tc,
-                staticInst, pc, tc->misspeculating());
+        return new IntelTraceRecord(when, tc, staticInst, pc, macroStaticInst);
     }
 };
 
-/* namespace Trace */ }
+} // namespace Trace
 
-#endif // __EXETRACE_HH__
+#endif // __CPU_INTELTRACE_HH__