changeset e1bb31f243e2 in /z/repo/gem5
details: http://repo.gem5.org/gem5?cmd=changeset;node=e1bb31f243e2
description:
        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.

diffstat:

 src/mem/bus.cc |  15 ++++++++-------
 1 files changed, 8 insertions(+), 7 deletions(-)

diffs (32 lines):

diff -r d4548b381e87 -r e1bb31f243e2 src/mem/bus.cc
--- a/src/mem/bus.cc    Mon Jan 09 18:08:20 2012 -0600
+++ b/src/mem/bus.cc    Mon Jan 09 18:08:20 2012 -0600
@@ -447,13 +447,6 @@
 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 @@
     // 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();
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to