Fix & tweak DPRINTFs for tracediff w/new cache code.
authorSteve Reinhardt <stever@eecs.umich.edu>
Sat, 14 Jul 2007 18:48:30 +0000 (11:48 -0700)
committerSteve Reinhardt <stever@eecs.umich.edu>
Sat, 14 Jul 2007 18:48:30 +0000 (11:48 -0700)
Note that we should *not* print pointer values in DPRINTFs as
these needlessly clutter tracediff output.

--HG--
extra : convert_revision : 25a448f1b3ac8d453a717a104ad6dc0112fb30bb

src/dev/alpha/tsunami_cchip.cc
src/dev/io_device.cc
src/mem/bridge.cc
src/mem/bus.cc
src/mem/cache/base_cache.cc
src/mem/cache/cache_impl.hh

index 118160adfbac82ad1269a7546652dafaa0b893cd..8ed7e339938ec040bcffd51d8df79d1d570158b2 100644 (file)
@@ -453,7 +453,7 @@ TsunamiCChip::postRTC()
        if (!(cpumask & itint)) {
            itint |= cpumask;
            tsunami->intrctrl->post(i, TheISA::INTLEVEL_IRQ2, 0);
-           DPRINTF(Tsunami, "Posting RTC interrupt to cpu=%d", i);
+           DPRINTF(Tsunami, "Posting RTC interrupt to cpu=%d\n", i);
        }
     }
 
index ecbb391ef7dd6f69e8f9883f9bbec6dd1c33eca4..be5756ab7bc3a2d27ddce8dbf112bdc6f021c2da 100644 (file)
@@ -103,8 +103,8 @@ DmaPort::recvTiming(PacketPtr pkt)
 
 
     if (pkt->result == Packet::Nacked) {
-        DPRINTF(DMA, "Received nacked Pkt %#x with State: %#x Addr: %#x\n",
-               pkt, pkt->senderState, pkt->getAddr());
+        DPRINTF(DMA, "Received nacked %s addr %#x\n",
+                pkt->cmdString(), pkt->getAddr());
 
         if (backoffTime < device->minBackoffDelay)
             backoffTime = device->minBackoffDelay;
@@ -121,8 +121,8 @@ DmaPort::recvTiming(PacketPtr pkt)
         DmaReqState *state;
         backoffTime >>= 2;
 
-        DPRINTF(DMA, "Received response Pkt %#x with State: %#x Addr: %#x size: %#x\n",
-               pkt, pkt->senderState, pkt->getAddr(), pkt->req->getSize());
+        DPRINTF(DMA, "Received response %s addr %#x size %#x\n",
+                pkt->cmdString(), pkt->getAddr(), pkt->req->getSize());
         state = dynamic_cast<DmaReqState*>(pkt->senderState);
         pendingCount--;
 
@@ -184,8 +184,8 @@ DmaPort::recvRetry()
     PacketPtr pkt = transmitList.front();
     bool result = true;
     do {
-        DPRINTF(DMA, "Retry on  Packet %#x with senderState: %#x\n",
-                   pkt, pkt->senderState);
+        DPRINTF(DMA, "Retry on %s addr %#x\n",
+                pkt->cmdString(), pkt->getAddr());
         result = sendTiming(pkt);
         if (result) {
             DPRINTF(DMA, "-- Done\n");
@@ -269,8 +269,8 @@ DmaPort::sendDma()
             return;
         }
 
-        DPRINTF(DMA, "Attempting to send Packet %#x with addr: %#x\n",
-                pkt, pkt->getAddr());
+        DPRINTF(DMA, "Attempting to send %s addr %#x\n",
+                pkt->cmdString(), pkt->getAddr());
 
         bool result;
         do {
index 04b0308e1fe38ce86e4c444d5b163f0fb89e5dba..8bc32711df4df31d1a14979149c1f067806dde4d 100644 (file)
@@ -213,10 +213,7 @@ Bridge::BridgePort::queueForSendTiming(PacketPtr pkt)
         if (buf->expectResponse && pkt->result == Packet::Nacked)
             --outstandingResponses;
 
-
-        DPRINTF(BusBridge, "restoring  sender state: %#X, from packet buffer: %#X\n",
-                        pkt->senderState, buf);
-        DPRINTF(BusBridge, "  is response, new dest %d\n", pkt->getDest());
+        DPRINTF(BusBridge, "response, new dest %d\n", pkt->getDest());
         delete buf;
     }
 
@@ -229,8 +226,6 @@ Bridge::BridgePort::queueForSendTiming(PacketPtr pkt)
 
     Tick readyTime = curTick + delay;
     PacketBuffer *buf = new PacketBuffer(pkt, readyTime);
-    DPRINTF(BusBridge, "old sender state: %#X, new sender state: %#X\n",
-            buf->origSenderState, buf);
 
     // If we're about to put this packet at the head of the queue, we
     // need to schedule an event to do the transmit.  Otherwise there
index d818a25ea4561ec3ed1ba311d49cb255770f888f..443c0557c60da619bba5548510f7fc8f2cd9d8cf 100644 (file)
@@ -173,9 +173,8 @@ bool
 Bus::recvTiming(PacketPtr pkt)
 {
     Port *port;
-    DPRINTF(Bus, "recvTiming: packet src %d dest %d addr 0x%x cmd %s result %d\n",
-            pkt->getSrc(), pkt->getDest(), pkt->getAddr(), pkt->cmdString(),
-            pkt->result);
+    DPRINTF(Bus, "recvTiming: packet src %d dest %d addr 0x%x cmd %s\n",
+            pkt->getSrc(), pkt->getDest(), pkt->getAddr(), pkt->cmdString());
 
     BusPort *pktPort;
     if (pkt->getSrc() == defaultId)
@@ -261,7 +260,6 @@ Bus::recvTiming(PacketPtr pkt)
 void
 Bus::recvRetry(int id)
 {
-    DPRINTF(Bus, "Received a retry from %s\n", id == -1 ? "self" : interfaces[id]->getPeer()->name());
     // If there's anything waiting, and the bus isn't busy...
     if (retryList.size() && curTick >= tickNextIdle) {
         //retryingPort = retryList.front();
index 8aac024604104ab82295c0026c4fb03d5cabb225..84373aa9b919c05b9ca81f706b532cbb6880ef10 100644 (file)
@@ -162,7 +162,7 @@ BaseCache::CachePort::recvRetry()
         mshr->pkt = copyPkt;
 
         bool success = sendTiming(pkt);
-        DPRINTF(Cache, "Address %x was %s in sending the timing request\n",
+        DPRINTF(CachePort, "Address %x was %s in sending the timing request\n",
                 pkt->getAddr(), success ? "succesful" : "unsuccesful");
 
         waitingOnRetry = !success;
@@ -272,7 +272,7 @@ BaseCache::RequestEvent::process()
         mshr->pkt = copyPkt;
 
         bool success = cachePort->sendTiming(pkt);
-        DPRINTF(Cache, "Address %x was %s in sending the timing request\n",
+        DPRINTF(CachePort, "Address %x was %s in sending the timing request\n",
                 pkt->getAddr(), success ? "succesful" : "unsuccesful");
 
         cachePort->waitingOnRetry = !success;
index 9b094c1e334f383ad250c76a6c00736a520cbb63..4cd5ab0047ea763270ed06470df83a9edfea509f 100644 (file)
@@ -631,8 +631,10 @@ Cache<TagStore,Coherence>::access(PacketPtr &pkt)
         delete wbPkt;
     }
 
-    DPRINTF(Cache, "%s %x %s\n", pkt->cmdString(), pkt->getAddr(),
-            (blk) ? "hit" : "miss");
+    if (!pkt->req->isUncacheable()) {
+        DPRINTF(Cache, "%s %x %s\n", pkt->cmdString(), pkt->getAddr(),
+                (blk) ? "hit" : "miss");
+    }
 
     if (blk) {
         // Hit
@@ -713,14 +715,14 @@ Cache<TagStore,Coherence>::sendResult(PacketPtr &pkt, MSHR* mshr,
             BlkType *blk = tags->findBlock(pkt->getAddr());
             CacheBlk::State old_state = (blk) ? blk->status : 0;
             CacheBlk::State new_state = coherence->getNewState(pkt,old_state);
-            if (old_state != new_state)
-                DPRINTF(Cache, "Block for blk addr %x moving from state "
-                        "%i to %i\n", pkt->getAddr(), old_state, new_state);
             //Set the state on the upgrade
             std::memcpy(pkt->getPtr<uint8_t>(), blk->data, blkSize);
             PacketList writebacks;
             handleFill(blk, mshr, new_state, writebacks, pkt);
             assert(writebacks.empty());
+            if (old_state != new_state)
+                DPRINTF(Cache, "Block addr %x moving from state "
+                        "%i to %i\n", pkt->getAddr(), old_state, new_state);
             missQueue->handleResponse(pkt, curTick + hitLatency);
         }
     } else if (pkt && !pkt->req->isUncacheable()) {
@@ -756,7 +758,7 @@ Cache<TagStore,Coherence>::handleResponse(PacketPtr &pkt)
             //Make the response a Bad address and send it
         }
 //     MemDebug::cacheResponse(pkt);
-        DPRINTF(Cache, "Handling reponse to %x\n", pkt->getAddr());
+        DPRINTF(Cache, "Handling response to %x\n", pkt->getAddr());
 
         if (pkt->isCacheFill() && !pkt->isNoAllocate()) {
             DPRINTF(Cache, "Block for addr %x being updated in Cache\n",
@@ -765,13 +767,11 @@ Cache<TagStore,Coherence>::handleResponse(PacketPtr &pkt)
             CacheBlk::State old_state = (blk) ? blk->status : 0;
             PacketList writebacks;
             CacheBlk::State new_state = coherence->getNewState(pkt,old_state);
-            if (old_state != new_state)
-                DPRINTF(Cache, "Block for blk addr %x moving from "
-                        "state %i to %i\n",
-                        pkt->getAddr(),
-                        old_state, new_state);
             blk = handleFill(blk, (MSHR*)pkt->senderState,
                                    new_state, writebacks, pkt);
+            if (old_state != new_state)
+                DPRINTF(Cache, "Block addr %x moving from state %i to %i\n",
+                        pkt->getAddr(), old_state, new_state);
             while (!writebacks.empty()) {
                 PacketPtr wbPkt = writebacks.front();
                 missQueue->doWriteback(wbPkt);
@@ -919,7 +919,7 @@ Cache<TagStore,Coherence>::snoop(PacketPtr &pkt)
     }
 
     if (satisfy) {
-        DPRINTF(Cache, "Cache snooped a %s request for addr %x and "
+        DPRINTF(Cache, "snooped a %s request for addr %x and "
                 "now supplying data, new state is %i\n",
                 pkt->cmdString(), blk_addr, new_state);
 
@@ -928,7 +928,7 @@ Cache<TagStore,Coherence>::snoop(PacketPtr &pkt)
         return;
     }
     if (blk)
-        DPRINTF(Cache, "Cache snooped a %s request for addr %x, "
+        DPRINTF(Cache, "snooped a %s request for addr %x, "
                 "new state is %i\n", pkt->cmdString(), blk_addr, new_state);
 
     handleSnoop(blk, new_state);
@@ -1070,11 +1070,11 @@ return 0;
                 coherence->getNewState(busPkt, old_state);
             DPRINTF(Cache, "Receive response: %s for addr %x in state %i\n",
                     busPkt->cmdString(), busPkt->getAddr(), old_state);
-            if (old_state != new_state)
-                DPRINTF(Cache, "Block for blk addr %x moving from state "
-                        "%i to %i\n", busPkt->getAddr(), old_state, new_state);
 
             handleFill(blk, busPkt, new_state, writebacks, pkt);
+            if (old_state != new_state)
+                DPRINTF(Cache, "Block addr %x moving from state "
+                        "%i to %i\n", busPkt->getAddr(), old_state, new_state);
             //Free the packet
             delete busPkt;
 
@@ -1127,8 +1127,8 @@ Cache<TagStore,Coherence>::snoopProbe(PacketPtr &pkt)
     CacheBlk::State new_state = 0;
     bool satisfy = coherence->handleBusRequest(pkt,blk,mshr, new_state);
     if (satisfy) {
-        DPRINTF(Cache, "Cache snooped a %s request for addr %x and "
-                "now supplying data, new state is %i\n",
+        DPRINTF(Cache, "Cache snooped a %s request for addr %x, "
+                "supplying data, new state is %i\n",
                 pkt->cmdString(), blk_addr, new_state);
 
             handleSnoop(blk, new_state, pkt);