Daniel Carvalho has uploaded this change for review. (
https://gem5-review.googlesource.com/c/public/gem5/+/13895
Change subject: mem-cache: Fix double block invalidation
......................................................................
mem-cache: Fix double block invalidation
Block was being invalidated twice when not a tempBlock.
Make explicit that the else case is only to be applied
when handling the tempBlock, as otherwise the Tags
should be taking care of the invalidation.
Change-Id: Ie7603fdbe156c54e94bbdc83541b55e66f8d250f
Signed-off-by: Daniel R. Carvalho <[email protected]>
---
M src/mem/cache/base.cc
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/mem/cache/base.cc b/src/mem/cache/base.cc
index 7bb0e0f..6f3914c 100644
--- a/src/mem/cache/base.cc
+++ b/src/mem/cache/base.cc
@@ -1305,9 +1305,13 @@
void
BaseCache::invalidateBlock(CacheBlk *blk)
{
- if (blk != tempBlock)
+ // If handling a block present in the Tags, let it do its invalidation
+ // process, which will update stats and invalidate the block itself
+ if (blk != tempBlock) {
tags->invalidate(blk);
- blk->invalidate();
+ } else {
+ tempBlock->invalidate();
+ }
}
void
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/13895
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-Change-Id: Ie7603fdbe156c54e94bbdc83541b55e66f8d250f
Gerrit-Change-Number: 13895
Gerrit-PatchSet: 1
Gerrit-Owner: Daniel Carvalho <[email protected]>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev