pktSize[slave_port_id][master_port_id] += pkt_size;
transDist[pkt_cmd]++;
- if (is_express_snoop)
+ if (is_express_snoop) {
snoops++;
+ snoopTraffic += pkt_size;
+ }
}
if (sink_packet)
pkt->getAddr());
// update stats here as we know the forwarding will succeed
+ unsigned int pkt_size = pkt->hasData() ? pkt->getSize() : 0;
transDist[pkt->cmdToIndex()]++;
snoops++;
+ snoopTraffic += pkt_size;
// we should only see express snoops from caches
assert(pkt->isExpressSnoop());
// stats updates
transDist[pkt_cmd]++;
snoops++;
+ snoopTraffic += pkt_size;
return true;
}
pkt->cmdString());
// add the request snoop data
+ unsigned int pkt_size = pkt->hasData() ? pkt->getSize() : 0;
snoops++;
+ snoopTraffic += pkt_size;
// forward to all snoopers
std::pair<MemCmd, Tick> snoop_result;
.desc("Total snoops (count)")
;
+ snoopTraffic
+ .name(name() + ".snoopTraffic")
+ .desc("Total snoop traffic (bytes)")
+ ;
+
snoopFanout
.init(0, snoopPorts.size(), 1)
.name(name() + ".snoop_fanout")