mem-cache: Remove redundant block initialization on allocation
authorNikos Nikoleris <nikos.nikoleris@arm.com>
Wed, 2 Nov 2016 17:28:46 +0000 (17:28 +0000)
committerNikos Nikoleris <nikos.nikoleris@arm.com>
Mon, 5 Mar 2018 17:11:47 +0000 (17:11 +0000)
Change-Id: I7496e12e6a517529316c480d5f6e2ade601f0e2d
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/8282
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com>

src/mem/cache/tags/base_set_assoc.hh

index cbd48092c37c7aecda4307aa5fa6905b3ab2880b..fc15b0220b33dd2ad8e01d5b601433b444de50d1 100644 (file)
@@ -257,12 +257,8 @@ public:
              replacements[0]++;
              totalRefs += blk->refCount;
              ++sampledRefs;
-             blk->refCount = 0;
-
-             // deal with evicted block
-             assert(blk->srcMasterId < cache->system->maxMasters());
-             occupancies[blk->srcMasterId]--;
 
+             invalidate(blk);
              blk->invalidate();
          }