ExeTrace: Allow subclasses of the tracer to define their own prefix to dump

This commit is contained in:
Korey Sewell 2009-02-10 15:49:29 -08:00
parent 2d0a66cbc1
commit 34a5cd8870
2 changed files with 8 additions and 1 deletions

View 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() << " ";

View 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