diff options
author | Brad Beckmann <Brad.Beckmann@amd.com> | 2010-01-29 20:29:21 -0800 |
---|---|---|
committer | Brad Beckmann <Brad.Beckmann@amd.com> | 2010-01-29 20:29:21 -0800 |
commit | 1907e39fd2c30ead9589f0bb6995972cbd0e153f (patch) | |
tree | 2e5c96fcd6dfc18af9b5a7e717590292f810ff52 /src/mem/ruby/network | |
parent | 020716cab3dca04d3f6b24b6dce67d5f5cbc4e5e (diff) | |
download | gem5-1907e39fd2c30ead9589f0bb6995972cbd0e153f.tar.xz |
ruby: added ruby stats print
Moved the previous rubymem stats print feature to ruby System so that ruby
stats are printed on simulation exit.
Diffstat (limited to 'src/mem/ruby/network')
-rw-r--r-- | src/mem/ruby/network/simple/SimpleNetwork.cc | 2 | ||||
-rw-r--r-- | src/mem/ruby/network/simple/Topology.cc | 14 | ||||
-rw-r--r-- | src/mem/ruby/network/simple/Topology.hh | 4 |
3 files changed, 18 insertions, 2 deletions
diff --git a/src/mem/ruby/network/simple/SimpleNetwork.cc b/src/mem/ruby/network/simple/SimpleNetwork.cc index ecd38de1a..2de8d07e5 100644 --- a/src/mem/ruby/network/simple/SimpleNetwork.cc +++ b/src/mem/ruby/network/simple/SimpleNetwork.cc @@ -225,6 +225,7 @@ void SimpleNetwork::printStats(ostream& out) const for(int i=0; i<m_switch_ptr_vector.size(); i++) { m_switch_ptr_vector[i]->printStats(out); } + m_topology_ptr->printStats(out); } void SimpleNetwork::clearStats() @@ -232,6 +233,7 @@ void SimpleNetwork::clearStats() for(int i=0; i<m_switch_ptr_vector.size(); i++) { m_switch_ptr_vector[i]->clearStats(); } + m_topology_ptr->clearStats(); } void SimpleNetwork::printConfig(ostream& out) const diff --git a/src/mem/ruby/network/simple/Topology.cc b/src/mem/ruby/network/simple/Topology.cc index 15c94d97d..e7fbe1ce3 100644 --- a/src/mem/ruby/network/simple/Topology.cc +++ b/src/mem/ruby/network/simple/Topology.cc @@ -238,6 +238,20 @@ void Topology::makeLink(Network *net, SwitchID src, SwitchID dest, const NetDest } } +void Topology::printStats(ostream& out) const +{ + for (int cntrl = 0; cntrl < m_controller_vector.size(); cntrl++) { + m_controller_vector[cntrl]->printStats(out); + } +} + +void Topology::clearStats() +{ + for (int cntrl = 0; cntrl < m_controller_vector.size(); cntrl++) { + m_controller_vector[cntrl]->clearStats(); + } +} + void Topology::printConfig(ostream& out) const { if (m_print_config == false) return; diff --git a/src/mem/ruby/network/simple/Topology.hh b/src/mem/ruby/network/simple/Topology.hh index fb010090f..c274ed330 100644 --- a/src/mem/ruby/network/simple/Topology.hh +++ b/src/mem/ruby/network/simple/Topology.hh @@ -102,8 +102,8 @@ public: void initNetworkPtr(Network* net_ptr); const string getName() { return m_name; } - void printStats(ostream& out) const {} - void clearStats() {} + void printStats(ostream& out) const; + void clearStats(); void printConfig(ostream& out) const; void print(ostream& out) const { out << "[Topology]"; } |