From: Korey Sewell Date: Tue, 10 Feb 2009 23:49:29 +0000 (-0800) Subject: ExeTrace: Allow subclasses of the tracer to define their own prefix to dump X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=34a5cd887075ff8bee987b87e43ae3818c6ac765;p=gem5.git ExeTrace: Allow subclasses of the tracer to define their own prefix to dump --- diff --git a/src/cpu/exetrace.cc b/src/cpu/exetrace.cc index 7227602b5..5897d1dbc 100644 --- a/src/cpu/exetrace.cc +++ b/src/cpu/exetrace.cc @@ -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() << " "; diff --git a/src/cpu/exetrace.hh b/src/cpu/exetrace.hh index e5b22c881..e49a2bb59 100644 --- a/src/cpu/exetrace.hh +++ b/src/cpu/exetrace.hh @@ -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