summaryrefslogtreecommitdiff
path: root/src/mem/cache/mshr.cc
diff options
context:
space:
mode:
authorNikos Nikoleris <nikos.nikoleris@arm.com>2016-12-05 16:48:21 -0500
committerNikos Nikoleris <nikos.nikoleris@arm.com>2016-12-05 16:48:21 -0500
commite16967941bceae40449cf56f822420a7088bd08a (patch)
treea7ccfdcd713c769ff8a485ec088eb585c0c8c632 /src/mem/cache/mshr.cc
parent61860f24193d43e137095cb505abd3413bdf708a (diff)
downloadgem5-e16967941bceae40449cf56f822420a7088bd08a.tar.xz
mem: Make packet debug printing more uniform
Previously DPRINTFs printing information about a packet would use ad hoc formats. This patch changes all DPRINTFs to use the print function defined by the packet class, making the packet printing format more uniform and easier to change. Change-Id: Idd436a9758d4bf70c86a574d524648b2a2580970 Reviewed-by: Andreas Hansson <andreas.hansson@arm.com> Reviewed-by: Stephan Diestelhorst <stephan.diestelhorst@arm.com>
Diffstat (limited to 'src/mem/cache/mshr.cc')
-rw-r--r--src/mem/cache/mshr.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mem/cache/mshr.cc b/src/mem/cache/mshr.cc
index e3ee44cc6..7c560095c 100644
--- a/src/mem/cache/mshr.cc
+++ b/src/mem/cache/mshr.cc
@@ -231,6 +231,7 @@ MSHR::TargetList::print(std::ostream &os, int verbosity,
}
ccprintf(os, "%s%s: ", prefix, s);
t.pkt->print(os, verbosity, "");
+ ccprintf(os, "\n");
}
}
@@ -343,15 +344,14 @@ MSHR::allocateTarget(PacketPtr pkt, Tick whenReady, Counter _order,
bool
MSHR::handleSnoop(PacketPtr pkt, Counter _order)
{
- DPRINTF(Cache, "%s for %s addr %#llx size %d\n", __func__,
- pkt->cmdString(), pkt->getAddr(), pkt->getSize());
+ DPRINTF(Cache, "%s for %s\n", __func__, pkt->print());
// when we snoop packets the needsWritable and isInvalidate flags
// should always be the same, however, this assumes that we never
// snoop writes as they are currently not marked as invalidations
panic_if(pkt->needsWritable() != pkt->isInvalidate(),
- "%s got snoop %s to addr %#llx where needsWritable, "
- "does not match isInvalidate", name(), pkt->cmdString(),
+ "%s got snoop %s where needsWritable, "
+ "does not match isInvalidate", name(), pkt->print(),
pkt->getAddr());
if (!inService || (pkt->isExpressSnoop() && downstreamPending)) {