mem-ruby: fix Sequencer latency reporting

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 <tiago.muck@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/41114
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
Tiago Mück
2020-10-01 16:45:56 -05:00
parent c1cb1f2f93
commit 1861bc39ea

View File

@@ -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