Nikos Nikoleris has uploaded this change for review. ( https://gem5-review.googlesource.com/10427

Change subject: mem-cache: Remove isTouched field from the CacheBlk
......................................................................

mem-cache: Remove isTouched field from the CacheBlk

At the moment isTouched is used in the warm-up detection mechanism but
it keeps track of the same information as isValid(). This change
removes it and substitutes its use by isValid().

Change-Id: I611ddf2fa4562ae3b3b2ed2fb74d26abd2e5ec62
---
M src/mem/cache/blk.cc
M src/mem/cache/blk.hh
M src/mem/cache/tags/base.cc
3 files changed, 6 insertions(+), 19 deletions(-)



diff --git a/src/mem/cache/blk.cc b/src/mem/cache/blk.cc
index 233f380..ad0c20a 100644
--- a/src/mem/cache/blk.cc
+++ b/src/mem/cache/blk.cc
@@ -46,9 +46,6 @@
 CacheBlk::insert(const Addr tag, const State is_secure,
                  const int src_master_ID, const uint32_t task_ID)
 {
-    // Touch block
-    isTouched = true;
-
     // Set block tag
     this->tag = tag;

diff --git a/src/mem/cache/blk.hh b/src/mem/cache/blk.hh
index b634d21..561d502 100644
--- a/src/mem/cache/blk.hh
+++ b/src/mem/cache/blk.hh
@@ -109,12 +109,6 @@
      */
     int set, way;

-    /**
-     * Whether this block has been touched since simulation started.
-     * Used to calculate number of used tags.
-     */
-    bool isTouched;
-
     /** Number of references to this block since it was brought in. */
     unsigned refCount;

@@ -217,7 +211,6 @@
         task_id = ContextSwitchTaskId::Unknown;
         status = 0;
         whenReady = MaxTick;
-        isTouched = false;
         refCount = 0;
         srcMasterId = Request::invldMasterId;
         tickInserted = MaxTick;
diff --git a/src/mem/cache/tags/base.cc b/src/mem/cache/tags/base.cc
index 75d117e..0087de8 100644
--- a/src/mem/cache/tags/base.cc
+++ b/src/mem/cache/tags/base.cc
@@ -78,14 +78,6 @@
     // Get address
     Addr addr = pkt->getAddr();

-    // Update warmup data
-    if (!blk->isTouched) {
-        if (!warmedUp && tagsInUse.value() >= warmupBound) {
-            warmedUp = true;
-            warmupCycle = curTick();
-        }
-    }
-
     // If we're replacing a block that was previously valid update
     // stats for it. This can't be done in findBlock() because a
     // found block might not actually be replaced there if the
@@ -100,7 +92,6 @@

     // Previous block, if existed, has been removed, and now we have
     // to insert the new one
-    tagsInUse++;

     // Deal with what we are bringing in
     MasterID master_id = pkt->req->masterId();
@@ -111,6 +102,12 @@
     blk->insert(extractTag(addr), pkt->isSecure(), master_id,
                 pkt->req->taskId());

+    tagsInUse++;
+    if (!warmedUp && tagsInUse.value() >= warmupBound) {
+        warmedUp = true;
+        warmupCycle = curTick();
+    }
+
     // We only need to write into one tag and one data block.
     tagAccesses += 1;
     dataAccesses += 1;

--
To view, visit https://gem5-review.googlesource.com/10427
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: I611ddf2fa4562ae3b3b2ed2fb74d26abd2e5ec62
Gerrit-Change-Number: 10427
Gerrit-PatchSet: 1
Gerrit-Owner: Nikos Nikoleris <[email protected]>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to