Nathanael Premillieu has uploaded this change for review. (
https://gem5-review.googlesource.com/c/public/gem5/+/47203 )
Change subject: mem: count pf filtered by demand to the same cache line
......................................................................
mem: count pf filtered by demand to the same cache line
Add a stat to count how many prefetch request are filtered in the
prefetch queue becasue a demand is going to the same cache line
Also adding a corresponding debug statement for when it happens
Change-Id: I52475f19bd109c135b7259d08d5f5c0b5fd90ee5
---
M src/mem/cache/prefetch/queued.cc
M src/mem/cache/prefetch/queued.hh
2 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/src/mem/cache/prefetch/queued.cc
b/src/mem/cache/prefetch/queued.cc
index 2d4d060..d22d9d7 100644
--- a/src/mem/cache/prefetch/queued.cc
+++ b/src/mem/cache/prefetch/queued.cc
@@ -187,8 +187,15 @@
while (itr != pfq.end()) {
if (itr->pfInfo.getAddr() == blk_addr &&
itr->pfInfo.isSecure() == is_secure) {
+ DPRINTF(HWPrefetch, "Removing pf candidate addr: %#x "
+ "(cl: %#x), demand request going to the same "
+ "addr (%#x, cl: %#x)!\n",
+ itr->pfInfo.getAddr(),
+ blockAddress(itr->pfInfo.getAddr()),
+ pfi.getAddr(), blockAddress(pfi.getAddr()));
delete itr->pkt;
itr = pfq.erase(itr);
+ statsQueued.pfRemovedDemand++;
} else {
++itr;
}
@@ -267,6 +274,9 @@
"number of redundant prefetches already in prefetch queue"),
ADD_STAT(pfInCache, statistics::units::Count::get(),
"number of redundant prefetches already in cache/mshr
dropped"),
+ ADD_STAT(pfRemovedDemand, statistics::units::Count::get(),
+ "number of prefetches dropped due to a demand for the same "
+ "address"),
ADD_STAT(pfRemovedFull, statistics::units::Count::get(),
"number of prefetches dropped due to prefetch queue size"),
ADD_STAT(pfSpanPage, statistics::units::Count::get(),
diff --git a/src/mem/cache/prefetch/queued.hh
b/src/mem/cache/prefetch/queued.hh
index 4e14df4..e230023 100644
--- a/src/mem/cache/prefetch/queued.hh
+++ b/src/mem/cache/prefetch/queued.hh
@@ -178,6 +178,7 @@
statistics::Scalar pfIdentified;
statistics::Scalar pfBufferHit;
statistics::Scalar pfInCache;
+ statistics::Scalar pfRemovedDemand;
statistics::Scalar pfRemovedFull;
statistics::Scalar pfSpanPage;
} statsQueued;
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/47203
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: I52475f19bd109c135b7259d08d5f5c0b5fd90ee5
Gerrit-Change-Number: 47203
Gerrit-PatchSet: 1
Gerrit-Owner: Nathanael Premillieu <[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