summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMin Kyu Jeong <MinKyu.Jeong@arm.com>2012-01-09 18:08:20 -0600
committerMin Kyu Jeong <MinKyu.Jeong@arm.com>2012-01-09 18:08:20 -0600
commitc94e5256d9d6a076118336a61b951bcf9b5482a1 (patch)
tree4974fe08d91ecc5cece14a5ba9d401e4fead976e
parentd2c26f402cfdb9a7fd34e98e3fc7aaa48c56c99b (diff)
downloadgem5-c94e5256d9d6a076118336a61b951bcf9b5482a1.tar.xz
mem: Change DPRINTF prints more useful destination port number.
Old code prints 0 for destination since pkt->getDest() returns 0 for pkt->getDest() == Packet::Broadcast, which is always true.
-rw-r--r--src/mem/bus.cc15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/mem/bus.cc b/src/mem/bus.cc
index 69b14547e..db71b86b7 100644
--- a/src/mem/bus.cc
+++ b/src/mem/bus.cc
@@ -447,13 +447,6 @@ Bus::recvAtomic(PacketPtr pkt)
void
Bus::recvFunctional(PacketPtr pkt)
{
- if (!pkt->isPrint()) {
- // don't do DPRINTFs on PrintReq as it clutters up the output
- DPRINTF(Bus,
- "recvFunctional: packet src %d dest %d addr 0x%x cmd %s\n",
- pkt->getSrc(), pkt->getDest(), pkt->getAddr(),
- pkt->cmdString());
- }
assert(pkt->getDest() == Packet::Broadcast);
int port_id = findPort(pkt->getAddr());
@@ -462,6 +455,14 @@ Bus::recvFunctional(PacketPtr pkt)
// id after each
int src_id = pkt->getSrc();
+ if (!pkt->isPrint()) {
+ // don't do DPRINTFs on PrintReq as it clutters up the output
+ DPRINTF(Bus,
+ "recvFunctional: packet src %d dest %d addr 0x%x cmd %s\n",
+ src_id, port_id, pkt->getAddr(),
+ pkt->cmdString());
+ }
+
assert(pkt->isRequest()); // hasn't already been satisfied
SnoopIter s_end = snoopPorts.end();