if (is_express_snoop) {
assert(success);
snoopDataThroughBus += pkt_size;
+ snoopsThroughBus++;
} else {
// for normal requests, check if successful
if (!success) {
// update stats here as we know the forwarding will succeed
transDist[pkt->cmdToIndex()]++;
snoopDataThroughBus += pkt->hasData() ? pkt->getSize() : 0;
+ snoopsThroughBus++;
// we should only see express snoops from caches
assert(pkt->isExpressSnoop());
// stats updates
transDist[pkt_cmd]++;
snoopDataThroughBus += pkt_size;
+ snoopsThroughBus++;
return true;
}
// snoops should only happen if the system isn't bypassing caches
assert(!system->bypassCaches());
+ unsigned fanout = 0;
+
for (SlavePortIter s = snoopPorts.begin(); s != snoopPorts.end(); ++s) {
SlavePort *p = *s;
// we could have gotten this request from a snooping master
p->getId() != exclude_slave_port_id) {
// cache is not allowed to refuse snoop
p->sendTimingSnoopReq(pkt);
+ fanout++;
}
}
+
+ // Stats for fanout of this forward operation
+ snoopFanout.sample(fanout);
}
void
// add the request snoop data
snoopDataThroughBus += pkt->hasData() ? pkt->getSize() : 0;
+ snoopsThroughBus++;
// forward to all snoopers
std::pair<MemCmd, Tick> snoop_result =
pkt->cmd = snoop_response_cmd;
// add the response snoop data
- if (pkt->isResponse())
+ if (pkt->isResponse()) {
snoopDataThroughBus += pkt->hasData() ? pkt->getSize() : 0;
+ snoopsThroughBus++;
+ }
// @todo: Not setting first-word time
pkt->busLastWordDelay = snoop_response_latency;
// snoops should only happen if the system isn't bypassing caches
assert(!system->bypassCaches());
+ unsigned fanout = 0;
+
for (SlavePortIter s = snoopPorts.begin(); s != snoopPorts.end(); ++s) {
SlavePort *p = *s;
// we could have gotten this request from a snooping master
if (exclude_slave_port_id == InvalidPortID ||
p->getId() != exclude_slave_port_id) {
Tick latency = p->sendAtomicSnoop(pkt);
+ fanout++;
+
// in contrast to a functional access, we have to keep on
// going as all snoopers must be updated even if we get a
// response
}
}
+ // Stats for fanout
+ snoopFanout.sample(fanout);
+
// the packet is restored as part of the loop and any potential
// snoop response is part of the returned pair
return std::make_pair(snoop_response_cmd, snoop_response_latency);
.desc("Total snoop data (bytes)")
;
+ snoopsThroughBus
+ .name(name() + ".snoops_through_bus")
+ .desc("Total snoops (count)")
+ ;
+
+ snoopFanout
+ .init(0, snoopPorts.size(), 1)
+ .name(name() + ".snoop_fanout")
+ .desc("Request fanout histogram")
+ ;
+
throughput
.name(name() + ".throughput")
.desc("Throughput (bytes/s)")