From: Nikos Nikoleris Date: Wed, 2 Nov 2016 17:28:46 +0000 (+0000) Subject: mem-cache: Remove redundant block initialization on allocation X-Git-Tag: v19.0.0.0~2265 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1ae7fced4d32898531a6875a339ef00e43e20e66;p=gem5.git mem-cache: Remove redundant block initialization on allocation Change-Id: I7496e12e6a517529316c480d5f6e2ade601f0e2d Reviewed-by: Andreas Sandberg Reviewed-on: https://gem5-review.googlesource.com/8282 Reviewed-by: Daniel Carvalho Maintainer: Nikos Nikoleris --- diff --git a/src/mem/cache/tags/base_set_assoc.hh b/src/mem/cache/tags/base_set_assoc.hh index cbd48092c..fc15b0220 100644 --- a/src/mem/cache/tags/base_set_assoc.hh +++ b/src/mem/cache/tags/base_set_assoc.hh @@ -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(); }