From: Min Kyu Jeong Date: Tue, 10 Jan 2012 00:08:20 +0000 (-0600) Subject: mem: Change DPRINTF prints more useful destination port number. X-Git-Tag: stable_2012_06_28~275^2~34 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c94e5256d9d6a076118336a61b951bcf9b5482a1;p=gem5.git 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. --- 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();