summaryrefslogtreecommitdiff
path: root/src/cpu
diff options
context:
space:
mode:
authorKorey Sewell <ksewell@umich.edu>2009-02-10 15:49:29 -0800
committerKorey Sewell <ksewell@umich.edu>2009-02-10 15:49:29 -0800
commit34a5cd887075ff8bee987b87e43ae3818c6ac765 (patch)
tree84c63905b003e1730814dd0df970231242ccb733 /src/cpu
parent2d0a66cbc123fc345deb070c323130382518f367 (diff)
downloadgem5-34a5cd887075ff8bee987b87e43ae3818c6ac765.tar.xz
ExeTrace: Allow subclasses of the tracer to define their own prefix to dump
Diffstat (limited to 'src/cpu')
-rw-r--r--src/cpu/exetrace.cc8
-rw-r--r--src/cpu/exetrace.hh1
2 files changed, 8 insertions, 1 deletions
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
@@ -46,12 +46,18 @@ 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