@@ -321,9 +321,27 @@ LSQ::LSQStats::LSQStats(statistics::Group *parent)
321321 ADD_STAT(dcacheMainPipeBlockedByS1Backpressure,
322322 statistics::units::Count::get (),
323323 "Number of requests blocked by fake dcache mainpipe S1 backpressure"),
324+ ADD_STAT(dcacheMainPipeStoreBlockedByS1Backpressure,
325+ statistics::units::Count::get (),
326+ "Number of store buffer requests blocked by fake dcache mainpipe S1 backpressure"),
327+ ADD_STAT(dcacheMainPipeRefillBlockedByS1Backpressure,
328+ statistics::units::Count::get (),
329+ "Number of refill requests blocked by fake dcache mainpipe S1 backpressure"),
330+ ADD_STAT(dcacheMainPipeStoreBlockedByTagWrite,
331+ statistics::units::Count::get (),
332+ "Number of store buffer requests blocked by fake dcache mainpipe tag write"),
333+ ADD_STAT(dcacheMainPipeRefillBlocked,
334+ statistics::units::Count::get (),
335+ "Number of pending refill requests blocked before fake dcache mainpipe entry"),
336+ ADD_STAT(dcacheMainPipeRefillBlockedByPipeResource,
337+ statistics::units::Count::get (),
338+ "Number of pending refill requests blocked by fake dcache mainpipe resources"),
324339 ADD_STAT(dcacheMainPipeBlockedByDataConflict,
325340 statistics::units::Count::get (),
326- "Number of fake dcache mainpipe S1 data reads blocked by S3 data writes")
341+ "Number of fake dcache mainpipe S1 data reads blocked by S3 data writes"),
342+ ADD_STAT(dcacheMainPipeStoreS2IssueBlocked,
343+ statistics::units::Count::get (),
344+ "Number of store buffer requests blocked when issuing from fake dcache mainpipe S2")
327345{
328346}
329347
@@ -626,6 +644,9 @@ LSQ::advanceDcacheMainPipe()
626644 next_s1_data_read.req = queued_refill;
627645 dcacheMainPipeRefillQ.pop ();
628646 ++stats.dcacheMainPipeRefillEnter ;
647+ } else {
648+ ++stats.dcacheMainPipeRefillBlocked ;
649+ ++stats.dcacheMainPipeRefillBlockedByPipeResource ;
629650 }
630651 }
631652
@@ -809,11 +830,23 @@ LSQ::canEnterDcacheMainPipe(
809830 const bool s1_backpressured =
810831 next_pipe.at (dcacheMainPipeIndex (DcacheMainPipeStage::S1DataRead)).valid ;
811832
833+ bool blocked = false ;
812834 if (s1_backpressured) {
813835 ++stats.dcacheMainPipeBlockedByS1Backpressure ;
814- return false ;
836+ if (request.isStoreBuffer ()) {
837+ ++stats.dcacheMainPipeStoreBlockedByS1Backpressure ;
838+ } else if (request.isRefill ()) {
839+ ++stats.dcacheMainPipeRefillBlockedByS1Backpressure ;
840+ }
841+ blocked = true ;
815842 }
816843 if (s0_tag_read_blocked) {
844+ if (request.isStoreBuffer ()) {
845+ ++stats.dcacheMainPipeStoreBlockedByTagWrite ;
846+ }
847+ blocked = true ;
848+ }
849+ if (blocked) {
817850 return false ;
818851 }
819852 return !isDcacheMainPipeSetBlocked (request.setKey );
@@ -829,13 +862,32 @@ LSQ::canEnterDcacheMainPipeNow(const DcacheMainPipeRequest &request)
829862bool
830863LSQ::canEnterStoreBufferDcacheMainPipe (const StoreBufferEntry &entry)
831864{
865+ const auto req = makeStoreBufferMainPipeRequest (entry);
866+ const bool set_blocked = isDcacheMainPipeSetBlocked (req.setKey );
867+ const bool s1_backpressured =
868+ dcacheMainPipeStage (DcacheMainPipeStage::S1DataRead).valid ;
869+ const bool s0_tag_read_blocked =
870+ dcacheMainPipeStage (DcacheMainPipeStage::S3Write).valid &&
871+ dcacheMainPipeStage (DcacheMainPipeStage::S3Write).req .needTagWrite ;
872+
832873 if (!dcacheMainPipeRefillQ.empty ()) {
874+ if (s1_backpressured) {
875+ ++stats.dcacheMainPipeStoreBlockedByS1Backpressure ;
876+ }
877+ if (s0_tag_read_blocked) {
878+ ++stats.dcacheMainPipeStoreBlockedByTagWrite ;
879+ }
833880 ++stats.dcacheMainPipeStoreBlockedByRefill ;
834881 return false ;
835882 }
836883
837- const auto req = makeStoreBufferMainPipeRequest (entry);
838- if (isDcacheMainPipeSetBlocked (req.setKey )) {
884+ if (set_blocked) {
885+ if (s1_backpressured) {
886+ ++stats.dcacheMainPipeStoreBlockedByS1Backpressure ;
887+ }
888+ if (s0_tag_read_blocked) {
889+ ++stats.dcacheMainPipeStoreBlockedByTagWrite ;
890+ }
839891 ++stats.dcacheMainPipeStoreBlockedBySet ;
840892 return false ;
841893 }
@@ -1335,6 +1387,7 @@ LSQ::issueSbufferPacketFromDcacheMainPipe(PacketPtr data_pkt, Tick issue_tick)
13351387 } else {
13361388 auto *entry = request->sbuffer_entry ;
13371389 stats.sbufferDcacheReqBlocked ++;
1390+ ++stats.dcacheMainPipeStoreS2IssueBlocked ;
13381391 entry->inDcacheMainPipe = false ;
13391392 // S2 issue failed. Exit the fake pipe and let the StoreBuffer replay
13401393 // this eviction from S0 through the replay queue.
0 commit comments