From 91f7b065a9b34ce0d3951001e30a9372d9b9dba9 Mon Sep 17 00:00:00 2001 From: Uri Wiener Date: Thu, 30 May 2013 12:53:58 -0400 Subject: mem: Add basic stats to the buses This patch adds a basic set of stats which are hard to impossible to implement using only communication monitors, and are needed for insight such as bus utilization, transactions through the bus etc. Stats added include throughput and transaction distribution, and also a two-dimensional vector capturing how many packets and how much data is exchanged between the masters and slaves connected to the bus. --- src/mem/coherent_bus.hh | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/mem/coherent_bus.hh') diff --git a/src/mem/coherent_bus.hh b/src/mem/coherent_bus.hh index 837cc23d8..eb8b41e6a 100644 --- a/src/mem/coherent_bus.hh +++ b/src/mem/coherent_bus.hh @@ -300,6 +300,9 @@ class CoherentBus : public BaseBus */ void forwardFunctional(PacketPtr pkt, PortID exclude_slave_port_id); + Stats::Scalar dataThroughBus; + Stats::Scalar snoopDataThroughBus; + public: virtual void init(); @@ -307,6 +310,8 @@ class CoherentBus : public BaseBus CoherentBus(const CoherentBusParams *p); unsigned int drain(DrainManager *dm); + + virtual void regStats(); }; #endif //__MEM_COHERENT_BUS_HH__ -- cgit v1.2.3