From eb19fc29761a99ff7d5a5e4588866b487a2082ee Mon Sep 17 00:00:00 2001 From: Radhika Jagtap Date: Mon, 7 Dec 2015 16:42:15 -0600 Subject: probe: Add probe in Fetch, IEW, Rename and Commit This patch adds probe points in Fetch, IEW, Rename and Commit stages as follows. A probe point is added in the Fetch stage for probing when a fetch request is sent. Notify is fired on the probe point when a request is sent succesfully in the first attempt as well as on a retry attempt. Probe points are added in the IEW stage when an instruction begins to execute and when execution is complete. This points can be used for monitoring the execution time of an instruction. Probe points are added in the Rename stage to probe renaming of source and destination registers and when there is squashing. These probe points can be used to track register dependencies and remove when there is squashing. A probe point for squashing is added in Commit to probe squashed instructions. --- src/cpu/o3/rename_impl.hh | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'src/cpu/o3/rename_impl.hh') diff --git a/src/cpu/o3/rename_impl.hh b/src/cpu/o3/rename_impl.hh index 43b7ba9aa..b19b3414c 100644 --- a/src/cpu/o3/rename_impl.hh +++ b/src/cpu/o3/rename_impl.hh @@ -184,6 +184,15 @@ DefaultRename::regStats() .prereq(fpRenameLookups); } +template +void +DefaultRename::regProbePoints() +{ + ppRename = new ProbePointArg(cpu->getProbeManager(), "Rename"); + ppSquashInRename = new ProbePointArg(cpu->getProbeManager(), + "SquashInRename"); +} + template void DefaultRename::setTimeBuffer(TimeBuffer *tb_ptr) @@ -697,7 +706,9 @@ DefaultRename::renameInsts(ThreadID tid) storesInProgress[tid]++; } ++renamed_insts; - + // Notify potential listeners that source and destination registers for + // this instruction have been renamed. + ppRename->notify(inst); // Put instruction in rename queue. toIEW->insts[toIEWIndex] = inst; @@ -929,6 +940,12 @@ DefaultRename::doSquash(const InstSeqNum &squashed_seq_num, ThreadID tid) freeList->addReg(hb_it->newPhysReg); } + // Notify potential listeners that the register mapping needs to be + // removed because the instruction it was mapped to got squashed. Note + // that this is done before hb_it is incremented. + ppSquashInRename->notify(std::make_pair(hb_it->instSeqNum, + hb_it->newPhysReg)); + historyBuffer[tid].erase(hb_it++); ++renameUndoneMaps; -- cgit v1.2.3