summaryrefslogtreecommitdiff
path: root/src/mem/coherent_bus.hh
diff options
context:
space:
mode:
authorUri Wiener <uri.wiener@arm.com>2013-05-30 12:53:58 -0400
committerUri Wiener <uri.wiener@arm.com>2013-05-30 12:53:58 -0400
commit91f7b065a9b34ce0d3951001e30a9372d9b9dba9 (patch)
tree0dbe87473a59772269a82ecd14c9700ec0547424 /src/mem/coherent_bus.hh
parente1e73c5f395504647344d3eaa08a5300591896f8 (diff)
downloadgem5-91f7b065a9b34ce0d3951001e30a9372d9b9dba9.tar.xz
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.
Diffstat (limited to 'src/mem/coherent_bus.hh')
-rw-r--r--src/mem/coherent_bus.hh5
1 files changed, 5 insertions, 0 deletions
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__