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 <power.jg@gmail.com> Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br> Reviewed-by: Jason Lowe-Power <power.jg@gmail.com> Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
1
src/mem/cache/SConscript
vendored
1
src/mem/cache/SConscript
vendored
@@ -47,6 +47,7 @@ DebugFlag('CacheTags')
|
||||
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
|
||||
|
||||
23
src/mem/cache/prefetch/queued.cc
vendored
23
src/mem/cache/prefetch/queued.cc
vendored
@@ -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 @@ Queued::~Queued()
|
||||
}
|
||||
}
|
||||
|
||||
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 @@ Queued::addToQueue(std::list<DeferredPacket> &queue,
|
||||
it++;
|
||||
queue.insert(it, dpp);
|
||||
}
|
||||
|
||||
if (Debug::HWPrefetchQueue)
|
||||
printQueue(queue);
|
||||
}
|
||||
|
||||
} // namespace prefetch
|
||||
|
||||
2
src/mem/cache/prefetch/queued.hh
vendored
2
src/mem/cache/prefetch/queued.hh
vendored
@@ -204,6 +204,8 @@ class Queued : public Base
|
||||
return pfq.empty() ? MaxTick : pfq.front().tick;
|
||||
}
|
||||
|
||||
void printQueue(const std::list<DeferredPacket> &queue) const;
|
||||
|
||||
private:
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user