Daniel Carvalho has uploaded this change for review. (
https://gem5-review.googlesource.com/c/public/gem5/+/13209
Change subject: mem-cache: Make checking function const in FALRU
......................................................................
mem-cache: Make checking function const in FALRU
The checking function should not be able to modify either
the head and tail pointers nor should it modify its class.
Change-Id: I2ad495f0c8c6b778d48512143e94b4c9a353f22e
Signed-off-by: Daniel R. Carvalho <[email protected]>
---
M src/mem/cache/tags/fa_lru.cc
M src/mem/cache/tags/fa_lru.hh
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/mem/cache/tags/fa_lru.cc b/src/mem/cache/tags/fa_lru.cc
index da32d61..2abe90c 100644
--- a/src/mem/cache/tags/fa_lru.cc
+++ b/src/mem/cache/tags/fa_lru.cc
@@ -281,10 +281,10 @@
}
void
-FALRU::CacheTracking::check(FALRUBlk *head, FALRUBlk *tail)
+FALRU::CacheTracking::check(const FALRUBlk *head, const FALRUBlk *tail)
const
{
#ifdef FALRU_DEBUG
- FALRUBlk* blk = head;
+ const FALRUBlk* blk = head;
unsigned curr_size = 0;
unsigned tracked_cache_size = minTrackedSize;
CachesMask in_caches_mask = inAllCachesMask;
diff --git a/src/mem/cache/tags/fa_lru.hh b/src/mem/cache/tags/fa_lru.hh
index 30e4bbc..f5d8d31 100644
--- a/src/mem/cache/tags/fa_lru.hh
+++ b/src/mem/cache/tags/fa_lru.hh
@@ -342,7 +342,7 @@
* @param head the MRU block of the actual cache
* @param head the LRU block of the actual cache
*/
- void check(FALRUBlk *head, FALRUBlk *tail);
+ void check(const FALRUBlk *head, const FALRUBlk *tail) const;
/**
* Register the stats for this object.
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/13209
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: I2ad495f0c8c6b778d48512143e94b4c9a353f22e
Gerrit-Change-Number: 13209
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