Nathanael Premillieu has submitted this change. (
https://gem5-review.googlesource.com/c/public/gem5/+/47199 )
Change subject: mem-cache: print prefetch queues in Queued prefetcher
......................................................................
mem-cache: print prefetch queues in Queued prefetcher
Added to track the content of the prefetch queues in the debug output
Change-Id: I49d0f4f643ec0dbd7af3087b6267d454cfccddba
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/47199
Maintainer: Jason Lowe-Power <[email protected]>
Reviewed-by: Daniel Carvalho <[email protected]>
Reviewed-by: Jason Lowe-Power <[email protected]>
Tested-by: kokoro <[email protected]>
---
M src/mem/cache/SConscript
M src/mem/cache/prefetch/queued.cc
M src/mem/cache/prefetch/queued.hh
3 files changed, 26 insertions(+), 0 deletions(-)
Approvals:
Jason Lowe-Power: Looks good to me, approved; Looks good to me, approved
Daniel Carvalho: Looks good to me, but someone else must approve
kokoro: Regressions pass
diff --git a/src/mem/cache/SConscript b/src/mem/cache/SConscript
index 0150692..7910b93 100644
--- a/src/mem/cache/SConscript
+++ b/src/mem/cache/SConscript
@@ -47,6 +47,7 @@
DebugFlag('CacheVerbose')
DebugFlag('HWPrefetch')
DebugFlag('MSHR')
+DebugFlag('HWPrefetchQueue')
# CacheTags is so outrageously verbose, printing the cache's entire tag
# array on each timing access, that you should probably have to ask for
diff --git a/src/mem/cache/prefetch/queued.cc
b/src/mem/cache/prefetch/queued.cc
index 9aa4f89..a2e1952 100644
--- a/src/mem/cache/prefetch/queued.cc
+++ b/src/mem/cache/prefetch/queued.cc
@@ -43,6 +43,7 @@
#include "base/logging.hh"
#include "base/trace.hh"
#include "debug/HWPrefetch.hh"
+#include "debug/HWPrefetchQueue.hh"
#include "mem/cache/base.hh"
#include "mem/request.hh"
#include "params/QueuedPrefetcher.hh"
@@ -116,6 +117,25 @@
}
}
+void
+Queued::printQueue(const std::list<DeferredPacket> &queue) const
+{
+ int pos = 0;
+ std::string queue_name = "";
+ if (&queue == &pfq) {
+ queue_name = "PFQ";
+ } else {
+ assert(&queue == &pfqMissingTranslation);
+ queue_name = "PFTransQ";
+ }
+
+ for (const_iterator it = queue.cbegin(); it != queue.cend();
+ it++, pos++) {
+ DPRINTF(HWPrefetchQueue, "%s[%d]: Prefetch Req Addr: %#x
prio: %3d\n",
+ queue_name, pos, it->pkt->getAddr(), it->priority);
+ }
+}
+
size_t
Queued::getMaxPermittedPrefetches(size_t total) const
{
@@ -488,6 +508,9 @@
it++;
queue.insert(it, dpp);
}
+
+ if (Debug::HWPrefetchQueue)
+ printQueue(queue);
}
} // namespace prefetch
diff --git a/src/mem/cache/prefetch/queued.hh
b/src/mem/cache/prefetch/queued.hh
index 31feb30..d710bc0 100644
--- a/src/mem/cache/prefetch/queued.hh
+++ b/src/mem/cache/prefetch/queued.hh
@@ -204,6 +204,8 @@
return pfq.empty() ? MaxTick : pfq.front().tick;
}
+ void printQueue(const std::list<DeferredPacket> &queue) const;
+
private:
/**
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/47199
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: I49d0f4f643ec0dbd7af3087b6267d454cfccddba
Gerrit-Change-Number: 47199
Gerrit-PatchSet: 7
Gerrit-Owner: Nathanael Premillieu <[email protected]>
Gerrit-Reviewer: Daniel Carvalho <[email protected]>
Gerrit-Reviewer: Jason Lowe-Power <[email protected]>
Gerrit-Reviewer: Nathanael Premillieu <[email protected]>
Gerrit-Reviewer: Nikos Nikoleris <[email protected]>
Gerrit-Reviewer: kokoro <[email protected]>
Gerrit-CC: Giacomo Travaglini <[email protected]>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s