cpu: Support trace termination in BaseTrafficGen
[gem5.git] / src / cpu / inteltrace.cc
index afa51b517a70c6ad7b44c88256919b5d978ee83c..c36f63920a6330afacd418e2ca92413ddd0775b0 100644 (file)
  *          Steve Raasch
  */
 
+#include "cpu/inteltrace.hh"
+
 #include <iomanip>
 
+#include "config/the_isa.hh"
 #include "cpu/exetrace.hh"
-#include "cpu/inteltrace.hh"
 #include "cpu/static_inst.hh"
-#include "params/IntelTrace.hh"
 
 using namespace std;
 using namespace TheISA;
@@ -48,7 +49,7 @@ Trace::IntelTraceRecord::dump()
 {
     ostream &outs = Trace::output();
     ccprintf(outs, "%7d ) ", when);
-    outs << "0x" << hex << PC << ":\t";
+    outs << "0x" << hex << pc.instAddr() << ":\t";
     if (staticInst->isLoad()) {
         ccprintf(outs, "<RD %#x>", addr);
     } else if (staticInst->isStore()) {
@@ -57,7 +58,7 @@ Trace::IntelTraceRecord::dump()
     outs << endl;
 }
 
-/* namespace Trace */ }
+} // namespace Trace
 
 ////////////////////////////////////////////////////////////////////////
 //
@@ -66,5 +67,5 @@ Trace::IntelTraceRecord::dump()
 Trace::IntelTrace *
 IntelTraceParams::create()
 {
-    return new Trace::IntelTrace(name);
-};
+    return new Trace::IntelTrace(this);
+}