mem-cache: Make findVictim non-const
In order to acquire stats when a victim is found, findVictim must be made const. Change-Id: I493c7849f07625c90b2b95fd220f50751f4d0f52 Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br> Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/22604 Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com> Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com>
This commit is contained in:
committed by
Daniel Carvalho
parent
7ff32d7b53
commit
37bcb128fa
2
src/mem/cache/tags/base.hh
vendored
2
src/mem/cache/tags/base.hh
vendored
@@ -280,7 +280,7 @@ class BaseTags : public ClockedObject
|
||||
*/
|
||||
virtual CacheBlk* findVictim(Addr addr, const bool is_secure,
|
||||
const std::size_t size,
|
||||
std::vector<CacheBlk*>& evict_blks) const = 0;
|
||||
std::vector<CacheBlk*>& evict_blks) = 0;
|
||||
|
||||
/**
|
||||
* Access block and update replacement data. May not succeed, in which case
|
||||
|
||||
2
src/mem/cache/tags/base_set_assoc.hh
vendored
2
src/mem/cache/tags/base_set_assoc.hh
vendored
@@ -167,7 +167,7 @@ class BaseSetAssoc : public BaseTags
|
||||
*/
|
||||
CacheBlk* findVictim(Addr addr, const bool is_secure,
|
||||
const std::size_t size,
|
||||
std::vector<CacheBlk*>& evict_blks) const override
|
||||
std::vector<CacheBlk*>& evict_blks) override
|
||||
{
|
||||
// Get possible entries to be victimized
|
||||
const std::vector<ReplaceableEntry*> entries =
|
||||
|
||||
2
src/mem/cache/tags/compressed_tags.cc
vendored
2
src/mem/cache/tags/compressed_tags.cc
vendored
@@ -103,7 +103,7 @@ CompressedTags::tagsInit()
|
||||
CacheBlk*
|
||||
CompressedTags::findVictim(Addr addr, const bool is_secure,
|
||||
const std::size_t compressed_size,
|
||||
std::vector<CacheBlk*>& evict_blks) const
|
||||
std::vector<CacheBlk*>& evict_blks)
|
||||
{
|
||||
// Get all possible locations of this superblock
|
||||
const std::vector<ReplaceableEntry*> superblock_entries =
|
||||
|
||||
2
src/mem/cache/tags/compressed_tags.hh
vendored
2
src/mem/cache/tags/compressed_tags.hh
vendored
@@ -109,7 +109,7 @@ class CompressedTags : public SectorTags
|
||||
*/
|
||||
CacheBlk* findVictim(Addr addr, const bool is_secure,
|
||||
const std::size_t compressed_size,
|
||||
std::vector<CacheBlk*>& evict_blks) const override;
|
||||
std::vector<CacheBlk*>& evict_blks) override;
|
||||
|
||||
/**
|
||||
* Insert the new block into the cache and update replacement data.
|
||||
|
||||
2
src/mem/cache/tags/fa_lru.cc
vendored
2
src/mem/cache/tags/fa_lru.cc
vendored
@@ -197,7 +197,7 @@ FALRU::findBlockBySetAndWay(int set, int way) const
|
||||
|
||||
CacheBlk*
|
||||
FALRU::findVictim(Addr addr, const bool is_secure, const std::size_t size,
|
||||
std::vector<CacheBlk*>& evict_blks) const
|
||||
std::vector<CacheBlk*>& evict_blks)
|
||||
{
|
||||
// The victim is always stored on the tail for the FALRU
|
||||
FALRUBlk* victim = tail;
|
||||
|
||||
2
src/mem/cache/tags/fa_lru.hh
vendored
2
src/mem/cache/tags/fa_lru.hh
vendored
@@ -225,7 +225,7 @@ class FALRU : public BaseTags
|
||||
*/
|
||||
CacheBlk* findVictim(Addr addr, const bool is_secure,
|
||||
const std::size_t size,
|
||||
std::vector<CacheBlk*>& evict_blks) const override;
|
||||
std::vector<CacheBlk*>& evict_blks) override;
|
||||
|
||||
/**
|
||||
* Insert the new block into the cache and update replacement data.
|
||||
|
||||
2
src/mem/cache/tags/sector_tags.cc
vendored
2
src/mem/cache/tags/sector_tags.cc
vendored
@@ -222,7 +222,7 @@ SectorTags::findBlock(Addr addr, bool is_secure) const
|
||||
|
||||
CacheBlk*
|
||||
SectorTags::findVictim(Addr addr, const bool is_secure, const std::size_t size,
|
||||
std::vector<CacheBlk*>& evict_blks) const
|
||||
std::vector<CacheBlk*>& evict_blks)
|
||||
{
|
||||
// Get possible entries to be victimized
|
||||
const std::vector<ReplaceableEntry*> sector_entries =
|
||||
|
||||
2
src/mem/cache/tags/sector_tags.hh
vendored
2
src/mem/cache/tags/sector_tags.hh
vendored
@@ -157,7 +157,7 @@ class SectorTags : public BaseTags
|
||||
*/
|
||||
CacheBlk* findVictim(Addr addr, const bool is_secure,
|
||||
const std::size_t size,
|
||||
std::vector<CacheBlk*>& evict_blks) const override;
|
||||
std::vector<CacheBlk*>& evict_blks) override;
|
||||
|
||||
/**
|
||||
* Calculate a block's offset in a sector from the address.
|
||||
|
||||
Reference in New Issue
Block a user