@@ -789,7 +789,14 @@ LSQUnit::LSQUnitStats::LSQUnitStats(statistics::Group *parent)
789789 ADD_STAT(RAWQueueFull, " Number of times RAW queue was full" ),
790790 ADD_STAT(RAWQueueReplay, " Number of instructions replayed from RAW queue" ),
791791 ADD_STAT(RAWQueueLatency, statistics::units::Cycle::get(), "RAW queue latency distribution"),
792- ADD_STAT(loadReplayEvents, statistics::units::Count::get(), "event distribution of load replay")
792+ ADD_STAT(loadReplayEvents, statistics::units::Count::get(), "event distribution of load replay"),
793+ ADD_STAT(replayedLoadIssueToPipe, statistics::units::Count::get(),
794+ "Number of replayed loads that enter the load pipeline"),
795+ ADD_STAT(replayedLoadReadyToFinish, statistics::units::Count::get(),
796+ "Number of replayed loads that finish execution"),
797+ ADD_STAT(replayedLoadFinishRate, statistics::units::Ratio::get(),
798+ "Replay load finish rate",
799+ replayedLoadReadyToFinish / replayedLoadIssueToPipe)
793800{
794801 loadToUse
795802 .init (0 , 299 , 10 )
@@ -811,6 +818,8 @@ LSQUnit::LSQUnitStats::LSQUnitStats(statistics::Group *parent)
811818 for (int i = 0 ; i < LdStReplayTypeCount; i++) {
812819 loadReplayEvents.subname (i, load_store_replay_event_str[static_cast <LdStReplayType>(i)]);
813820 }
821+
822+ replayedLoadFinishRate.precision (6 );
814823}
815824
816825void
@@ -1220,6 +1229,10 @@ LSQUnit::issueToLoadPipe(const DynInstPtr &inst)
12201229 loadPipeSx[0 ]->insts [idx] = inst;
12211230 loadPipeSx[0 ]->size ++;
12221231
1232+ if (inst->everReplayed ()) {
1233+ stats.replayedLoadIssueToPipe ++;
1234+ }
1235+
12231236 DPRINTF (LoadPipeline, " issueToLoadPipe: [sn:%llu]\n " , inst->seqNum );
12241237}
12251238
@@ -1605,7 +1618,12 @@ LSQUnit::executeLoadPipeSx()
16051618 }
16061619
16071620 if (i == loadPipeStages - 1 && !inst->needReplay ()) {
1608- if (inst->isNormalLd () || !inst->readMemAccPredicate ()) iewStage->readyToFinish (inst);
1621+ if (inst->isNormalLd () || !inst->readMemAccPredicate ()) {
1622+ if (inst->everReplayed ()) {
1623+ stats.replayedLoadReadyToFinish ++;
1624+ }
1625+ iewStage->readyToFinish (inst);
1626+ }
16091627 iewStage->activityThisCycle ();
16101628 inst->endPipelining ();
16111629 DPRINTF (LoadPipeline, " Load [sn:%llu] ready to finish\n " ,
0 commit comments