From 9af53ddaec43653d915649173660dc5c71f06a72 Mon Sep 17 00:00:00 2001 From: Chun-Chen TK Hsu Date: Thu, 11 Jul 2019 15:27:41 +0800 Subject: [PATCH] mem: Check response only when needed in CommMonitor 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 Maintainer: Nikos Nikoleris Tested-by: kokoro --- src/mem/comm_monitor.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mem/comm_monitor.cc b/src/mem/comm_monitor.cc index 90268bf3f..24457c9f0 100644 --- a/src/mem/comm_monitor.cc +++ b/src/mem/comm_monitor.cc @@ -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; -- 2.30.2