mem-cache: print VA and PA in the prefetch queues

As prefetcher can use VA and need translation, it is
interesting to see both VA and PA when printing the queues.
PA is printed as 0 if translation has not happened yet.
Also fix a bug when the pkt is not yet created.

Change-Id: I7cd225379c2930a8d6a7882efdb3dc7bc49fb8a3
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/48683
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Maintainer: Daniel Carvalho <odanrc@yahoo.com.br>
This commit is contained in:
Nathanael Premillieu
2021-07-28 10:30:17 +02:00
parent 555cdefb34
commit 393a964266

View File

@@ -131,8 +131,11 @@ Queued::printQueue(const std::list<DeferredPacket> &queue) const
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);
Addr vaddr = it->pfInfo.getAddr();
/* Set paddr to 0 if not yet translated */
Addr paddr = it->pkt ? it->pkt->getAddr() : 0;
DPRINTF(HWPrefetchQueue, "%s[%d]: Prefetch Req VA: %#x PA: %#x "
"prio: %3d\n", queue_name, pos, vaddr, paddr, it->priority);
}
}