summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSteve Reinhardt <steve.reinhardt@amd.com>2009-09-26 10:50:50 -0700
committerSteve Reinhardt <steve.reinhardt@amd.com>2009-09-26 10:50:50 -0700
commit4bec4702e9338735f58f0769f853ddff3657850e (patch)
treec15bdf7765304a113de4bbe152e91b8253694760 /src
parentf67963078883cdb62094ca187a40a79d773251a7 (diff)
downloadgem5-4bec4702e9338735f58f0769f853ddff3657850e.tar.xz
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.
Diffstat (limited to 'src')
-rw-r--r--src/cpu/SConscript5
-rw-r--r--src/cpu/o3/commit_impl.hh8
2 files changed, 8 insertions, 5 deletions
diff --git a/src/cpu/SConscript b/src/cpu/SConscript
index ea79b622c..b89a589c6 100644
--- a/src/cpu/SConscript
+++ b/src/cpu/SConscript
@@ -160,6 +160,7 @@ TraceFlag('DynInst')
TraceFlag('ExecEnable')
TraceFlag('ExecCPSeq')
TraceFlag('ExecEffAddr')
+TraceFlag('ExecFaulting', 'Trace faulting instructions')
TraceFlag('ExecFetchSeq')
TraceFlag('ExecOpClass')
TraceFlag('ExecRegDelta')
@@ -176,6 +177,6 @@ TraceFlag('PCEvent')
TraceFlag('Quiesce')
CompoundFlag('Exec', [ 'ExecEnable', 'ExecTicks', 'ExecOpClass', 'ExecThread',
- 'ExecEffAddr', 'ExecResult', 'ExecSymbol', 'ExecMicro' ])
+ 'ExecEffAddr', 'ExecResult', 'ExecSymbol', 'ExecMicro', 'ExecFaulting' ])
CompoundFlag('ExecNoTicks', [ 'ExecEnable', 'ExecOpClass', 'ExecThread',
- 'ExecEffAddr', 'ExecResult', 'ExecMicro' ])
+ 'ExecEffAddr', 'ExecResult', 'ExecMicro', 'ExecFaulting' ])
diff --git a/src/cpu/o3/commit_impl.hh b/src/cpu/o3/commit_impl.hh
index aa0f79272..cb5f23814 100644
--- a/src/cpu/o3/commit_impl.hh
+++ b/src/cpu/o3/commit_impl.hh
@@ -1076,9 +1076,11 @@ DefaultCommit<Impl>::commitHead(DynInstPtr &head_inst, unsigned inst_num)
commitStatus[tid] = TrapPending;
if (head_inst->traceData) {
- head_inst->traceData->setFetchSeq(head_inst->seqNum);
- head_inst->traceData->setCPSeq(thread[tid]->numInst);
- head_inst->traceData->dump();
+ if (DTRACE(ExecFaulting)) {
+ head_inst->traceData->setFetchSeq(head_inst->seqNum);
+ head_inst->traceData->setCPSeq(thread[tid]->numInst);
+ head_inst->traceData->dump();
+ }
delete head_inst->traceData;
head_inst->traceData = NULL;
}