From 393a96426646da5d615b71552ae86aac3efe04b1 Mon Sep 17 00:00:00 2001 From: Nathanael Premillieu Date: Wed, 28 Jul 2021 10:30:17 +0200 Subject: [PATCH] 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 Reviewed-by: Daniel Carvalho Maintainer: Daniel Carvalho --- src/mem/cache/prefetch/queued.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/mem/cache/prefetch/queued.cc b/src/mem/cache/prefetch/queued.cc index ae4913d2b0..c54f442563 100644 --- a/src/mem/cache/prefetch/queued.cc +++ b/src/mem/cache/prefetch/queued.cc @@ -131,8 +131,11 @@ Queued::printQueue(const std::list &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); } }