#include "cpu/exetrace.hh"
#include <iomanip>
+#include <sstream>
#include "arch/isa_traits.hh"
#include "arch/utility.hh"
namespace Trace {
-void
-ExeTracerRecord::dumpTicks(ostream &outs)
-{
- ccprintf(outs, "%7d: ", when);
-}
-
void
Trace::ExeTracerRecord::traceInst(const StaticInstPtr &inst, bool ran)
{
- ostream &outs = Trace::output();
+ std::stringstream outs;
if (!Debug::ExecUser || !Debug::ExecKernel) {
bool in_user_mode = TheISA::inUserMode(thread);
if (!in_user_mode && !Debug::ExecKernel) return;
}
- if (!DTRACE(FmtTicksOff))
- dumpTicks(outs);
-
- outs << thread->getCpuPtr()->name() << " ";
-
if (Debug::ExecAsid)
outs << "A" << dec << TheISA::getExecutingAsid(thread) << " ";
// End of line...
//
outs << endl;
+
+ Trace::getDebugLogger()->dprintf_flag(
+ when, thread->getCpuPtr()->name(), "ExecEnable", outs.str().c_str());
}
void
void traceInst(const StaticInstPtr &inst, bool ran);
void dump();
- virtual void dumpTicks(std::ostream &outs);
};
class ExeTracer : public InstTracer