just commit what i need for dumping traces compatible with intel's casper

--HG--
extra : convert_revision : a0c4a68a576fa771fd553eaedd6a07255a04dca2
This commit is contained in:
Lisa Hsu 2005-11-09 16:42:36 -05:00
parent 6e192b5704
commit 3532a661c5
2 changed files with 22 additions and 12 deletions

View file

@ -52,6 +52,7 @@ void
Trace::InstRecord::dump(ostream &outs)
{
if (flags[INTEL_FORMAT]) {
if (cpu->system->name() == trace_system) {
ccprintf(outs, "%7d ) ", cycle);
outs << "0x" << hex << PC << ":\t";
if (staticInst->isLoad()) {
@ -61,6 +62,8 @@ Trace::InstRecord::dump(ostream &outs)
outs << "<WR 0x" << hex << addr;
outs << ">";
}
outs << endl;
}
} else {
if (flags[PRINT_CYCLE])
ccprintf(outs, "%7d: ", cycle);
@ -135,15 +138,17 @@ Trace::InstRecord::dump(ostream &outs)
if (flags[PRINT_CP_SEQ] && cp_seq_valid)
outs << " CPSeq=" << dec << cp_seq;
}
//
// End of line...
//
outs << endl;
}
}
vector<bool> Trace::InstRecord::flags(NUM_BITS);
string Trace::InstRecord::trace_system;
////////////////////////////////////////////////////////////////////////
//
@ -184,6 +189,9 @@ Param<bool> exe_trace_print_cp_seq(&exeTraceParams, "print_cpseq",
"print correct-path sequence number", false);
Param<bool> exe_trace_intel_format(&exeTraceParams, "intel_format",
"print trace in intel compatible format", false);
Param<string> exe_trace_system(&exeTraceParams, "trace_system",
"print trace of which system (client or server)",
"client");
//
@ -204,6 +212,7 @@ Trace::InstRecord::setParams()
flags[PRINT_FETCH_SEQ] = exe_trace_print_fetchseq;
flags[PRINT_CP_SEQ] = exe_trace_print_cp_seq;
flags[INTEL_FORMAT] = exe_trace_intel_format;
trace_system = exe_trace_system;
}
void

View file

@ -148,6 +148,7 @@ class InstRecord : public Record
};
static std::vector<bool> flags;
static std::string trace_system;
static void setParams();