summaryrefslogtreecommitdiff
path: root/src/mem/cache/tags/compressed_tags.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/mem/cache/tags/compressed_tags.cc')
-rw-r--r--src/mem/cache/tags/compressed_tags.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/mem/cache/tags/compressed_tags.cc b/src/mem/cache/tags/compressed_tags.cc
index 1871a7ad6..d2ab7cf43 100644
--- a/src/mem/cache/tags/compressed_tags.cc
+++ b/src/mem/cache/tags/compressed_tags.cc
@@ -138,7 +138,9 @@ CompressedTags::findVictim(Addr addr, const bool is_secure,
// The whole superblock must be evicted to make room for the new one
for (const auto& blk : victim_superblock->blks){
- evict_blks.push_back(blk);
+ if (blk->isValid()) {
+ evict_blks.push_back(blk);
+ }
}
}
@@ -159,6 +161,9 @@ CompressedTags::findVictim(Addr addr, const bool is_secure,
}
}
+ // Update number of sub-blocks evicted due to a replacement
+ sectorStats.evictionsReplacement[evict_blks.size()]++;
+
return victim;
}