/*
- * Copyright (c) 2012-2013, 2015-2016 ARM Limited
+ * Copyright (c) 2012-2013, 2015-2017 ARM Limited
* All rights reserved.
*
* The license below extends only to copyright in the software and shall
#include <string>
#include <vector>
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "base/types.hh"
#include "debug/Cache.hh"
#include "mem/cache/cache.hh"
}
ccprintf(os, "%s%s: ", prefix, s);
t.pkt->print(os, verbosity, "");
+ ccprintf(os, "\n");
}
}
bool
MSHR::handleSnoop(PacketPtr pkt, Counter _order)
{
- DPRINTF(Cache, "%s for %s addr %#llx size %d\n", __func__,
- pkt->cmdString(), pkt->getAddr(), pkt->getSize());
+ DPRINTF(Cache, "%s for %s\n", __func__, pkt->print());
// when we snoop packets the needsWritable and isInvalidate flags
// should always be the same, however, this assumes that we never
// snoop writes as they are currently not marked as invalidations
panic_if(pkt->needsWritable() != pkt->isInvalidate(),
- "%s got snoop %s to addr %#llx where needsWritable, "
- "does not match isInvalidate", name(), pkt->cmdString(),
- pkt->getAddr());
+ "%s got snoop %s where needsWritable, "
+ "does not match isInvalidate", name(), pkt->print());
if (!inService || (pkt->isExpressSnoop() && downstreamPending)) {
// Request has not been issued yet, or it's been issued
// Start by determining if we will eventually respond or not,
// matching the conditions checked in Cache::handleSnoop
- bool will_respond = isPendingModified() && pkt->needsResponse() &&
- pkt->cmd != MemCmd::InvalidateReq;
+ bool will_respond = isPendingModified() && pkt->needsResponse();
// The packet we are snooping may be deleted by the time we
// actually process the target, and we consequently need to
// the packet and the request as part of handling the deferred
// snoop.
PacketPtr cp_pkt = will_respond ? new Packet(pkt, true, true) :
- new Packet(new Request(*pkt->req), pkt->cmd);
+ new Packet(new Request(*pkt->req), pkt->cmd, blkSize);
if (will_respond) {
// we are the ordering point, and will consequently
// avoid memory consistency violations.
if (pkt->cmd == MemCmd::ReadRespWithInvalidate) {
auto it = targets.begin();
- assert(it->source == Target::FromCPU);
+ assert((it->source == Target::FromCPU) ||
+ (it->source == Target::FromPrefetcher));
ready_targets.push_back(*it);
it = targets.erase(it);
while (it != targets.end()) {