From 1861bc39ea460f5509367919b000c1c492c4d184 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tiago=20M=C3=BCck?= Date: Thu, 1 Oct 2020 16:45:56 -0500 Subject: [PATCH] mem-ruby: fix Sequencer latency reporting MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Most protocols won't set initialRequestTime, forwardRequestTime, and firstResponseTime, thus leading to calculated latency being always 0. Change-Id: Id2c73314a964bf6efb262d40b3df515373023b84 Signed-off-by: Tiago Mück Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/41114 Reviewed-by: Jason Lowe-Power Maintainer: Jason Lowe-Power Tested-by: kokoro --- src/mem/ruby/system/Sequencer.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mem/ruby/system/Sequencer.cc b/src/mem/ruby/system/Sequencer.cc index ab8367777..49c03519a 100644 --- a/src/mem/ruby/system/Sequencer.cc +++ b/src/mem/ruby/system/Sequencer.cc @@ -334,7 +334,7 @@ Sequencer::recordMissLatency(SequencerRequest* srequest, bool llscSuccess, assert(curCycle() >= issued_time); Cycles total_lat = completion_time - issued_time; - if (initialRequestTime < issued_time) { + if ((initialRequestTime != 0) && (initialRequestTime < issued_time)) { // if the request was combined in the protocol with an earlier request // for the same address, it is possible that it will return an // initialRequestTime corresponding the earlier request. Since Cycles -- 2.30.2