ExeTrace: Allow subclasses of the tracer to define their own prefix to dump
authorKorey Sewell <ksewell@umich.edu>
Tue, 10 Feb 2009 23:49:29 +0000 (15:49 -0800)
committerKorey Sewell <ksewell@umich.edu>
Tue, 10 Feb 2009 23:49:29 +0000 (15:49 -0800)
src/cpu/exetrace.cc
src/cpu/exetrace.hh

index 7227602b5dfbaaf77afe1c2881026bbddaba1f46..5897d1dbcd8bf93a8b3dbeef4040acbe8ad75739 100644 (file)
@@ -45,13 +45,19 @@ using namespace TheISA;
 
 namespace Trace {
 
+void
+ExeTracerRecord::dumpTicks(ostream &outs)
+{
+    ccprintf(outs, "%7d: ", when);
+}
+
 void
 Trace::ExeTracerRecord::traceInst(StaticInstPtr inst, bool ran)
 {
     ostream &outs = Trace::output();
 
     if (IsOn(ExecTicks))
-        ccprintf(outs, "%7d: ", when);
+        dumpTicks(outs);
 
     outs << thread->getCpuPtr()->name() << " ";
 
index e5b22c8819efb40f49cf37bf7ad12bc0e6394c65..e49a2bb59ce3c3269c7e8b1280c1d5b0b94b0c01 100644 (file)
@@ -57,6 +57,7 @@ class ExeTracerRecord : public InstRecord
     void traceInst(StaticInstPtr inst, bool ran);
 
     void dump();
+    virtual void dumpTicks(std::ostream &outs);
 };
 
 class ExeTracer : public InstTracer