summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel R. Carvalho <odanrc@yahoo.com.br>2018-03-06 12:14:39 +0100
committerDaniel Carvalho <odanrc@yahoo.com.br>2018-03-06 17:24:05 +0000
commit93f57da4c48913552f984ccfe4b1318782a0e64a (patch)
tree5d17e33c2459648b71e484a679bffdd39363380a /src
parent17d7f736ace967a38b5b611c40776a0bbc9197da (diff)
downloadgem5-93f57da4c48913552f984ccfe4b1318782a0e64a.tar.xz
mem-cache: Fix bug generated by 8282
Merge 1ae7fced4d32898531a6875a339ef00e43e20e66 generated a bug in tagsInUse calculation. Change-Id: I079e327a0a26a7968f2ed8e433dd6e790c80998b Reviewed-on: https://gem5-review.googlesource.com/8781 Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com> Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com>
Diffstat (limited to 'src')
-rw-r--r--src/mem/cache/tags/base_set_assoc.hh5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mem/cache/tags/base_set_assoc.hh b/src/mem/cache/tags/base_set_assoc.hh
index 21a250e75..44f68d5fc 100644
--- a/src/mem/cache/tags/base_set_assoc.hh
+++ b/src/mem/cache/tags/base_set_assoc.hh
@@ -239,8 +239,6 @@ public:
uint32_t task_id = pkt->req->taskId();
if (!blk->isTouched) {
- tagsInUse++;
- blk->isTouched = true;
if (!warmedUp && tagsInUse.value() >= warmupBound) {
warmedUp = true;
warmupCycle = curTick();
@@ -260,6 +258,9 @@ public:
blk->invalidate();
}
+ // Previous block, if existed, has been removed, and now we have
+ // to insert the new one and mark it as touched
+ tagsInUse++;
blk->isTouched = true;
// Set tag for new block. Caller is responsible for setting status.