add a flag that supercedes all other InstExec flags to print a trace in the Intel sim compatible format.
--HG-- extra : convert_revision : 19569e5645f2d68fb68a0352753c08c2a24bfdc4
This commit is contained in:
parent
a23ff5ac96
commit
7b04cd9561
2 changed files with 73 additions and 58 deletions
|
@ -51,7 +51,17 @@ using namespace std;
|
||||||
void
|
void
|
||||||
Trace::InstRecord::dump(ostream &outs)
|
Trace::InstRecord::dump(ostream &outs)
|
||||||
{
|
{
|
||||||
|
if (flags[INTEL_FORMAT]) {
|
||||||
|
ccprintf(outs, "%7d ) ", cycle);
|
||||||
|
outs << "0x" << hex << PC << ":\t";
|
||||||
|
if (staticInst->isLoad()) {
|
||||||
|
outs << "<RD 0x" << hex << addr;
|
||||||
|
outs << ">";
|
||||||
|
} else if (staticInst->isStore()) {
|
||||||
|
outs << "<WR 0x" << hex << addr;
|
||||||
|
outs << ">";
|
||||||
|
}
|
||||||
|
} else {
|
||||||
if (flags[PRINT_CYCLE])
|
if (flags[PRINT_CYCLE])
|
||||||
ccprintf(outs, "%7d: ", cycle);
|
ccprintf(outs, "%7d: ", cycle);
|
||||||
|
|
||||||
|
@ -125,7 +135,7 @@ Trace::InstRecord::dump(ostream &outs)
|
||||||
|
|
||||||
if (flags[PRINT_CP_SEQ] && cp_seq_valid)
|
if (flags[PRINT_CP_SEQ] && cp_seq_valid)
|
||||||
outs << " CPSeq=" << dec << cp_seq;
|
outs << " CPSeq=" << dec << cp_seq;
|
||||||
|
}
|
||||||
//
|
//
|
||||||
// End of line...
|
// End of line...
|
||||||
//
|
//
|
||||||
|
@ -172,6 +182,9 @@ Param<bool> exe_trace_print_fetchseq(&exeTraceParams, "print_fetchseq",
|
||||||
"print fetch sequence number", false);
|
"print fetch sequence number", false);
|
||||||
Param<bool> exe_trace_print_cp_seq(&exeTraceParams, "print_cpseq",
|
Param<bool> exe_trace_print_cp_seq(&exeTraceParams, "print_cpseq",
|
||||||
"print correct-path sequence number", false);
|
"print correct-path sequence number", false);
|
||||||
|
Param<bool> exe_trace_intel_format(&exeTraceParams, "intel_format",
|
||||||
|
"print trace in intel compatible format", false);
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Helper function for ExecutionTraceParamContext::checkParams() just
|
// Helper function for ExecutionTraceParamContext::checkParams() just
|
||||||
|
@ -190,6 +203,7 @@ Trace::InstRecord::setParams()
|
||||||
flags[PRINT_INT_REGS] = exe_trace_print_iregs;
|
flags[PRINT_INT_REGS] = exe_trace_print_iregs;
|
||||||
flags[PRINT_FETCH_SEQ] = exe_trace_print_fetchseq;
|
flags[PRINT_FETCH_SEQ] = exe_trace_print_fetchseq;
|
||||||
flags[PRINT_CP_SEQ] = exe_trace_print_cp_seq;
|
flags[PRINT_CP_SEQ] = exe_trace_print_cp_seq;
|
||||||
|
flags[INTEL_FORMAT] = exe_trace_intel_format;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -143,6 +143,7 @@ class InstRecord : public Record
|
||||||
PRINT_INT_REGS,
|
PRINT_INT_REGS,
|
||||||
PRINT_FETCH_SEQ,
|
PRINT_FETCH_SEQ,
|
||||||
PRINT_CP_SEQ,
|
PRINT_CP_SEQ,
|
||||||
|
INTEL_FORMAT,
|
||||||
NUM_BITS
|
NUM_BITS
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue