Fix & tweak DPRINTFs for tracediff w/new cache code.

Note that we should *not* print pointer values in DPRINTFs as
these needlessly clutter tracediff output.

--HG--
extra : convert_revision : 25a448f1b3ac8d453a717a104ad6dc0112fb30bb
This commit is contained in:
Steve Reinhardt 2007-07-14 11:48:30 -07:00
parent 92bb9242fb
commit 7cd6c7ee05
6 changed files with 32 additions and 39 deletions

View file

@ -453,7 +453,7 @@ TsunamiCChip::postRTC()
if (!(cpumask & itint)) { if (!(cpumask & itint)) {
itint |= cpumask; itint |= cpumask;
tsunami->intrctrl->post(i, TheISA::INTLEVEL_IRQ2, 0); 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);
} }
} }

View file

@ -103,8 +103,8 @@ DmaPort::recvTiming(PacketPtr pkt)
if (pkt->result == Packet::Nacked) { if (pkt->result == Packet::Nacked) {
DPRINTF(DMA, "Received nacked Pkt %#x with State: %#x Addr: %#x\n", DPRINTF(DMA, "Received nacked %s addr %#x\n",
pkt, pkt->senderState, pkt->getAddr()); pkt->cmdString(), pkt->getAddr());
if (backoffTime < device->minBackoffDelay) if (backoffTime < device->minBackoffDelay)
backoffTime = device->minBackoffDelay; backoffTime = device->minBackoffDelay;
@ -121,8 +121,8 @@ DmaPort::recvTiming(PacketPtr pkt)
DmaReqState *state; DmaReqState *state;
backoffTime >>= 2; backoffTime >>= 2;
DPRINTF(DMA, "Received response Pkt %#x with State: %#x Addr: %#x size: %#x\n", DPRINTF(DMA, "Received response %s addr %#x size %#x\n",
pkt, pkt->senderState, pkt->getAddr(), pkt->req->getSize()); pkt->cmdString(), pkt->getAddr(), pkt->req->getSize());
state = dynamic_cast<DmaReqState*>(pkt->senderState); state = dynamic_cast<DmaReqState*>(pkt->senderState);
pendingCount--; pendingCount--;
@ -184,8 +184,8 @@ DmaPort::recvRetry()
PacketPtr pkt = transmitList.front(); PacketPtr pkt = transmitList.front();
bool result = true; bool result = true;
do { do {
DPRINTF(DMA, "Retry on Packet %#x with senderState: %#x\n", DPRINTF(DMA, "Retry on %s addr %#x\n",
pkt, pkt->senderState); pkt->cmdString(), pkt->getAddr());
result = sendTiming(pkt); result = sendTiming(pkt);
if (result) { if (result) {
DPRINTF(DMA, "-- Done\n"); DPRINTF(DMA, "-- Done\n");
@ -269,8 +269,8 @@ DmaPort::sendDma()
return; return;
} }
DPRINTF(DMA, "Attempting to send Packet %#x with addr: %#x\n", DPRINTF(DMA, "Attempting to send %s addr %#x\n",
pkt, pkt->getAddr()); pkt->cmdString(), pkt->getAddr());
bool result; bool result;
do { do {

View file

@ -213,10 +213,7 @@ Bridge::BridgePort::queueForSendTiming(PacketPtr pkt)
if (buf->expectResponse && pkt->result == Packet::Nacked) if (buf->expectResponse && pkt->result == Packet::Nacked)
--outstandingResponses; --outstandingResponses;
DPRINTF(BusBridge, "response, new dest %d\n", pkt->getDest());
DPRINTF(BusBridge, "restoring sender state: %#X, from packet buffer: %#X\n",
pkt->senderState, buf);
DPRINTF(BusBridge, " is response, new dest %d\n", pkt->getDest());
delete buf; delete buf;
} }
@ -229,8 +226,6 @@ Bridge::BridgePort::queueForSendTiming(PacketPtr pkt)
Tick readyTime = curTick + delay; Tick readyTime = curTick + delay;
PacketBuffer *buf = new PacketBuffer(pkt, readyTime); 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 // 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 // need to schedule an event to do the transmit. Otherwise there

View file

@ -173,9 +173,8 @@ bool
Bus::recvTiming(PacketPtr pkt) Bus::recvTiming(PacketPtr pkt)
{ {
Port *port; Port *port;
DPRINTF(Bus, "recvTiming: packet src %d dest %d addr 0x%x cmd %s result %d\n", DPRINTF(Bus, "recvTiming: packet src %d dest %d addr 0x%x cmd %s\n",
pkt->getSrc(), pkt->getDest(), pkt->getAddr(), pkt->cmdString(), pkt->getSrc(), pkt->getDest(), pkt->getAddr(), pkt->cmdString());
pkt->result);
BusPort *pktPort; BusPort *pktPort;
if (pkt->getSrc() == defaultId) if (pkt->getSrc() == defaultId)
@ -261,7 +260,6 @@ Bus::recvTiming(PacketPtr pkt)
void void
Bus::recvRetry(int id) 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 there's anything waiting, and the bus isn't busy...
if (retryList.size() && curTick >= tickNextIdle) { if (retryList.size() && curTick >= tickNextIdle) {
//retryingPort = retryList.front(); //retryingPort = retryList.front();

View file

@ -162,7 +162,7 @@ BaseCache::CachePort::recvRetry()
mshr->pkt = copyPkt; mshr->pkt = copyPkt;
bool success = sendTiming(pkt); 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"); pkt->getAddr(), success ? "succesful" : "unsuccesful");
waitingOnRetry = !success; waitingOnRetry = !success;
@ -272,7 +272,7 @@ BaseCache::RequestEvent::process()
mshr->pkt = copyPkt; mshr->pkt = copyPkt;
bool success = cachePort->sendTiming(pkt); 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"); pkt->getAddr(), success ? "succesful" : "unsuccesful");
cachePort->waitingOnRetry = !success; cachePort->waitingOnRetry = !success;

View file

@ -631,8 +631,10 @@ Cache<TagStore,Coherence>::access(PacketPtr &pkt)
delete wbPkt; delete wbPkt;
} }
DPRINTF(Cache, "%s %x %s\n", pkt->cmdString(), pkt->getAddr(), if (!pkt->req->isUncacheable()) {
(blk) ? "hit" : "miss"); DPRINTF(Cache, "%s %x %s\n", pkt->cmdString(), pkt->getAddr(),
(blk) ? "hit" : "miss");
}
if (blk) { if (blk) {
// Hit // Hit
@ -713,14 +715,14 @@ Cache<TagStore,Coherence>::sendResult(PacketPtr &pkt, MSHR* mshr,
BlkType *blk = tags->findBlock(pkt->getAddr()); BlkType *blk = tags->findBlock(pkt->getAddr());
CacheBlk::State old_state = (blk) ? blk->status : 0; CacheBlk::State old_state = (blk) ? blk->status : 0;
CacheBlk::State new_state = coherence->getNewState(pkt,old_state); 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 //Set the state on the upgrade
std::memcpy(pkt->getPtr<uint8_t>(), blk->data, blkSize); std::memcpy(pkt->getPtr<uint8_t>(), blk->data, blkSize);
PacketList writebacks; PacketList writebacks;
handleFill(blk, mshr, new_state, writebacks, pkt); handleFill(blk, mshr, new_state, writebacks, pkt);
assert(writebacks.empty()); 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); missQueue->handleResponse(pkt, curTick + hitLatency);
} }
} else if (pkt && !pkt->req->isUncacheable()) { } 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 //Make the response a Bad address and send it
} }
// MemDebug::cacheResponse(pkt); // 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()) { if (pkt->isCacheFill() && !pkt->isNoAllocate()) {
DPRINTF(Cache, "Block for addr %x being updated in Cache\n", 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; CacheBlk::State old_state = (blk) ? blk->status : 0;
PacketList writebacks; PacketList writebacks;
CacheBlk::State new_state = coherence->getNewState(pkt,old_state); 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, blk = handleFill(blk, (MSHR*)pkt->senderState,
new_state, writebacks, pkt); 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()) { while (!writebacks.empty()) {
PacketPtr wbPkt = writebacks.front(); PacketPtr wbPkt = writebacks.front();
missQueue->doWriteback(wbPkt); missQueue->doWriteback(wbPkt);
@ -919,7 +919,7 @@ Cache<TagStore,Coherence>::snoop(PacketPtr &pkt)
} }
if (satisfy) { 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", "now supplying data, new state is %i\n",
pkt->cmdString(), blk_addr, new_state); pkt->cmdString(), blk_addr, new_state);
@ -928,7 +928,7 @@ Cache<TagStore,Coherence>::snoop(PacketPtr &pkt)
return; return;
} }
if (blk) 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); "new state is %i\n", pkt->cmdString(), blk_addr, new_state);
handleSnoop(blk, new_state); handleSnoop(blk, new_state);
@ -1070,11 +1070,11 @@ return 0;
coherence->getNewState(busPkt, old_state); coherence->getNewState(busPkt, old_state);
DPRINTF(Cache, "Receive response: %s for addr %x in state %i\n", DPRINTF(Cache, "Receive response: %s for addr %x in state %i\n",
busPkt->cmdString(), busPkt->getAddr(), old_state); 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); 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 //Free the packet
delete busPkt; delete busPkt;
@ -1127,8 +1127,8 @@ Cache<TagStore,Coherence>::snoopProbe(PacketPtr &pkt)
CacheBlk::State new_state = 0; CacheBlk::State new_state = 0;
bool satisfy = coherence->handleBusRequest(pkt,blk,mshr, new_state); bool satisfy = coherence->handleBusRequest(pkt,blk,mshr, new_state);
if (satisfy) { if (satisfy) {
DPRINTF(Cache, "Cache snooped a %s request for addr %x and " DPRINTF(Cache, "Cache snooped a %s request for addr %x, "
"now supplying data, new state is %i\n", "supplying data, new state is %i\n",
pkt->cmdString(), blk_addr, new_state); pkt->cmdString(), blk_addr, new_state);
handleSnoop(blk, new_state, pkt); handleSnoop(blk, new_state, pkt);