Hello Andreas Sandberg,
I'd like you to do a code review. Please visit
https://gem5-review.googlesource.com/8287
to review the following change.
Change subject: mem-cache: Make the block invalidate functions virtual
......................................................................
mem-cache: Make the block invalidate functions virtual
This change makes the cache block invalidation function in the
BaseTags and CacheBlk class virtual to enable derived classes.
Change-Id: I2e64b01c6ca637f16d10474fc8b08eeec3f23453
Reviewed-by: Andreas Sandberg <[email protected]>
---
M src/mem/cache/blk.hh
M src/mem/cache/tags/base.hh
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/mem/cache/blk.hh b/src/mem/cache/blk.hh
index 66f05c8..7dd0a92 100644
--- a/src/mem/cache/blk.hh
+++ b/src/mem/cache/blk.hh
@@ -170,6 +170,7 @@
CacheBlk(const CacheBlk&) = delete;
CacheBlk& operator=(const CacheBlk&) = delete;
+ virtual ~CacheBlk() {};
/**
* Checks the write permissions of this block.
@@ -205,7 +206,7 @@
/**
* Invalidate the block and clear all state.
*/
- void invalidate()
+ virtual void invalidate()
{
tag = MaxAddr;
task_id = ContextSwitchTaskId::Unknown;
diff --git a/src/mem/cache/tags/base.hh b/src/mem/cache/tags/base.hh
index f407ec1..dfd8aeb 100644
--- a/src/mem/cache/tags/base.hh
+++ b/src/mem/cache/tags/base.hh
@@ -241,7 +241,7 @@
* does not invalidate the block itself.
* @param blk The block to invalidate.
*/
- void invalidate(CacheBlk *blk)
+ virtual void invalidate(CacheBlk *blk)
{
assert(blk);
assert(blk->isValid());
--
To view, visit https://gem5-review.googlesource.com/8287
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I2e64b01c6ca637f16d10474fc8b08eeec3f23453
Gerrit-Change-Number: 8287
Gerrit-PatchSet: 1
Gerrit-Owner: Nikos Nikoleris <[email protected]>
Gerrit-Reviewer: Andreas Sandberg <[email protected]>
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev