inorder: optionally track faulting instructions
authorKorey Sewell <ksewell@umich.edu>
Mon, 20 Jun 2011 01:43:38 +0000 (21:43 -0400)
committerKorey Sewell <ksewell@umich.edu>
Mon, 20 Jun 2011 01:43:38 +0000 (21:43 -0400)
src/cpu/inorder/resources/graduation_unit.cc

index 641d7b5ad00f5d915c56c63d5613fbe29ab4b42c..d34e1b512fecf503d8d58e958d79c6dc28393e19 100644 (file)
@@ -72,6 +72,15 @@ GraduationUnit::execute(int slot_num)
                         inst->instName());
                 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();
+                    delete inst->traceData;
+                    inst->traceData = NULL;
+                }
+
                 cpu->trapContext(inst->fault, tid, inst);
                 grad_req->done(false);
                 return;