inorder:tracing: fix fault tracing bug
authorKorey Sewell <ksewell@umich.edu>
Mon, 20 Jun 2011 01:43:42 +0000 (21:43 -0400)
committerKorey Sewell <ksewell@umich.edu>
Mon, 20 Jun 2011 01:43:42 +0000 (21:43 -0400)
src/cpu/inorder/resource.cc

index 8bc355f5ca5f8073a1c3106b2f9ad0f5e7bbb640..dfca83a8f8b7f6d9f08fc47af923956b9dcaca3e 100644 (file)
@@ -348,10 +348,14 @@ Resource::squashThenTrap(int stage_num, DynInstPtr inst)
     inst->setSquashInfo(stage_num);
     setupSquash(inst, stage_num, tid);
 
-    if (inst->traceData && DTRACE(ExecFaulting)) {
-        inst->traceData->setStageCycle(stage_num, curTick());
-        inst->traceData->setFetchSeq(inst->seqNum);
-        inst->traceData->dump();
+    if (inst->traceData) {
+        if (inst->staticInst &&
+            inst->fault != NoFault && DTRACE(ExecFaulting)) {
+            inst->traceData->setStageCycle(stage_num, curTick());
+            inst->traceData->setFetchSeq(inst->seqNum);
+            inst->traceData->dump();
+        }
+
         delete inst->traceData;
         inst->traceData = NULL;
     }