From 34a5cd887075ff8bee987b87e43ae3818c6ac765 Mon Sep 17 00:00:00 2001 From: Korey Sewell Date: Tue, 10 Feb 2009 15:49:29 -0800 Subject: [PATCH] ExeTrace: Allow subclasses of the tracer to define their own prefix to dump --- src/cpu/exetrace.cc | 8 +++++++- src/cpu/exetrace.hh | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) 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 -- 2.30.2