mem: Check response only when needed in CommMonitor
authorChun-Chen TK Hsu <chunchenhsu@google.com>
Thu, 11 Jul 2019 07:27:41 +0000 (15:27 +0800)
committerChun-Chen TK Hsu <chunchenhsu@google.com>
Sat, 13 Jul 2019 03:17:22 +0000 (03:17 +0000)
CommMonitor checks pkt->isResponse() for all packets in recvAtomic().
This assertion fails when packets don't need response, such as WritebackDirty.
This change fixes this.

Signed-off-by: Chun-Chen TK Hsu
Change-Id: I168e349e179b14fa5472698d9300478dc89693fb
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/19428
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
src/mem/comm_monitor.cc

index 90268bf3f2839943baba651e8e475742e45346e1..24457c9f01f94ae610f3e462bc03d8b3b4ac9d8c 100644 (file)
@@ -220,7 +220,8 @@ CommMonitor::recvAtomic(PacketPtr pkt)
     if (expects_response)
         stats.updateRespStats(req_pkt_info, delay, true);
 
-    assert(pkt->isResponse());
+    // Some packets, such as WritebackDirty, don't need response.
+    assert(pkt->isResponse() || !expects_response);
     ProbePoints::PacketInfo resp_pkt_info(pkt);
     ppPktResp->notify(resp_pkt_info);
     return delay;