Daniel Carvalho has uploaded this change for review. (
https://gem5-review.googlesource.com/c/public/gem5/+/35697 )
Change subject: mem-cache: Debug with blk's information instead of its
state.
......................................................................
mem-cache: Debug with blk's information instead of its state.
The print() function has been defined to facilitate debugging
regarding a block's metadata. Use it instead of accessing the
coherence bits directly.
Change-Id: Iba41f4ac067561970621a4bba809e1b315b0210d
Signed-off-by: Daniel R. Carvalho <[email protected]>
---
M src/mem/cache/base.cc
M src/mem/cache/cache.cc
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/mem/cache/base.cc b/src/mem/cache/base.cc
index 4b7333c..fc2115a 100644
--- a/src/mem/cache/base.cc
+++ b/src/mem/cache/base.cc
@@ -1310,7 +1310,7 @@
Addr addr = pkt->getAddr();
bool is_secure = pkt->isSecure();
#if TRACING_ON
- CacheBlk::State old_state = blk ? blk->status : 0;
+ const std::string old_state = blk ? blk->print() : "";
#endif
// When handling a fill, we should have no writes to this line.
@@ -1380,7 +1380,7 @@
}
}
- DPRINTF(Cache, "Block addr %#llx (%s) moving from state %x to %s\n",
+ DPRINTF(Cache, "Block addr %#llx (%s) moving from %s to %s\n",
addr, is_secure ? "s" : "ns", old_state, blk->print());
// if we got new data, copy it in (checking for a read response
diff --git a/src/mem/cache/cache.cc b/src/mem/cache/cache.cc
index a46404b..8e45ea3 100644
--- a/src/mem/cache/cache.cc
+++ b/src/mem/cache/cache.cc
@@ -590,7 +590,7 @@
bus_pkt->print());
#if TRACING_ON
- CacheBlk::State old_state = blk ? blk->status : 0;
+ const std::string old_state = blk ? blk->print() : "";
#endif
Cycles latency = ticksToCycles(memSidePort.sendAtomic(bus_pkt));
@@ -598,7 +598,7 @@
bool is_invalidate = bus_pkt->isInvalidate();
// We are now dealing with the response handling
- DPRINTF(Cache, "%s: Receive response: %s in state %i\n", __func__,
+ DPRINTF(Cache, "%s: Receive response: %s for %s\n", __func__,
bus_pkt->print(), old_state);
// If packet was a forward, the response (if any) is already
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/35697
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: Iba41f4ac067561970621a4bba809e1b315b0210d
Gerrit-Change-Number: 35697
Gerrit-PatchSet: 1
Gerrit-Owner: Daniel Carvalho <[email protected]>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s