ExeTrace: Allow subclasses of the tracer to define their own prefix to dump
This commit is contained in:
parent
2d0a66cbc1
commit
34a5cd8870
2 changed files with 8 additions and 1 deletions
|
@ -45,13 +45,19 @@ using namespace TheISA;
|
||||||
|
|
||||||
namespace Trace {
|
namespace Trace {
|
||||||
|
|
||||||
|
void
|
||||||
|
ExeTracerRecord::dumpTicks(ostream &outs)
|
||||||
|
{
|
||||||
|
ccprintf(outs, "%7d: ", when);
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Trace::ExeTracerRecord::traceInst(StaticInstPtr inst, bool ran)
|
Trace::ExeTracerRecord::traceInst(StaticInstPtr inst, bool ran)
|
||||||
{
|
{
|
||||||
ostream &outs = Trace::output();
|
ostream &outs = Trace::output();
|
||||||
|
|
||||||
if (IsOn(ExecTicks))
|
if (IsOn(ExecTicks))
|
||||||
ccprintf(outs, "%7d: ", when);
|
dumpTicks(outs);
|
||||||
|
|
||||||
outs << thread->getCpuPtr()->name() << " ";
|
outs << thread->getCpuPtr()->name() << " ";
|
||||||
|
|
||||||
|
|
|
@ -57,6 +57,7 @@ class ExeTracerRecord : public InstRecord
|
||||||
void traceInst(StaticInstPtr inst, bool ran);
|
void traceInst(StaticInstPtr inst, bool ran);
|
||||||
|
|
||||||
void dump();
|
void dump();
|
||||||
|
virtual void dumpTicks(std::ostream &outs);
|
||||||
};
|
};
|
||||||
|
|
||||||
class ExeTracer : public InstTracer
|
class ExeTracer : public InstTracer
|
||||||
|
|
Loading…
Reference in a new issue