O3: Add flag to control whether faulting instructions are traced.

When enabled, faulting instructions appear in the trace twice
(once when they fault and again when they're re-executed).
This flag is set by the Exec compound flag for backwards compatibility.
This commit is contained in:
Steve Reinhardt 2009-09-26 10:50:50 -07:00
parent f679630788
commit 4bec4702e9
2 changed files with 8 additions and 5 deletions

View file

@ -160,6 +160,7 @@ TraceFlag('DynInst')
TraceFlag('ExecEnable') TraceFlag('ExecEnable')
TraceFlag('ExecCPSeq') TraceFlag('ExecCPSeq')
TraceFlag('ExecEffAddr') TraceFlag('ExecEffAddr')
TraceFlag('ExecFaulting', 'Trace faulting instructions')
TraceFlag('ExecFetchSeq') TraceFlag('ExecFetchSeq')
TraceFlag('ExecOpClass') TraceFlag('ExecOpClass')
TraceFlag('ExecRegDelta') TraceFlag('ExecRegDelta')
@ -176,6 +177,6 @@ TraceFlag('PCEvent')
TraceFlag('Quiesce') TraceFlag('Quiesce')
CompoundFlag('Exec', [ 'ExecEnable', 'ExecTicks', 'ExecOpClass', 'ExecThread', CompoundFlag('Exec', [ 'ExecEnable', 'ExecTicks', 'ExecOpClass', 'ExecThread',
'ExecEffAddr', 'ExecResult', 'ExecSymbol', 'ExecMicro' ]) 'ExecEffAddr', 'ExecResult', 'ExecSymbol', 'ExecMicro', 'ExecFaulting' ])
CompoundFlag('ExecNoTicks', [ 'ExecEnable', 'ExecOpClass', 'ExecThread', CompoundFlag('ExecNoTicks', [ 'ExecEnable', 'ExecOpClass', 'ExecThread',
'ExecEffAddr', 'ExecResult', 'ExecMicro' ]) 'ExecEffAddr', 'ExecResult', 'ExecMicro', 'ExecFaulting' ])

View file

@ -1076,9 +1076,11 @@ DefaultCommit<Impl>::commitHead(DynInstPtr &head_inst, unsigned inst_num)
commitStatus[tid] = TrapPending; commitStatus[tid] = TrapPending;
if (head_inst->traceData) { if (head_inst->traceData) {
head_inst->traceData->setFetchSeq(head_inst->seqNum); if (DTRACE(ExecFaulting)) {
head_inst->traceData->setCPSeq(thread[tid]->numInst); head_inst->traceData->setFetchSeq(head_inst->seqNum);
head_inst->traceData->dump(); head_inst->traceData->setCPSeq(thread[tid]->numInst);
head_inst->traceData->dump();
}
delete head_inst->traceData; delete head_inst->traceData;
head_inst->traceData = NULL; head_inst->traceData = NULL;
} }