diff options
author | Nilay Vaish <nilay@cs.wisc.edu> | 2013-02-10 21:26:22 -0600 |
---|---|---|
committer | Nilay Vaish <nilay@cs.wisc.edu> | 2013-02-10 21:26:22 -0600 |
commit | a49b1df3f0d1e1c9ce46675d9fce7787d98caca7 (patch) | |
tree | 9c79c45ad9d0c19cff355a156f7e5ac2ee715998 /src/mem/ruby/network | |
parent | 10f1f8c6a49fa96ffb420eaa8cdd3641128ec9ec (diff) | |
download | gem5-a49b1df3f0d1e1c9ce46675d9fce7787d98caca7.tar.xz |
ruby: record fully busy cycle with in the controller
This patch does several things. First, the counter for fully busy cycles for a
controller is now kept with in the controller, instead of being part of the profiler.
Second, the topology class no longer keeps an array of controllers which was only
used for printing stats. Instead, ruby system will now ask each controller to print
the stats. Thirdly, the statistical variable for recording how many different types
were created is being moved in to the controller from the profiler. Note that for
printing, the profiler will collate results from different controllers.
Diffstat (limited to 'src/mem/ruby/network')
-rw-r--r-- | src/mem/ruby/network/Topology.cc | 19 | ||||
-rw-r--r-- | src/mem/ruby/network/Topology.hh | 3 | ||||
-rw-r--r-- | src/mem/ruby/network/garnet/BaseGarnetNetwork.cc | 1 | ||||
-rw-r--r-- | src/mem/ruby/network/simple/SimpleNetwork.cc | 2 |
4 files changed, 1 insertions, 24 deletions
diff --git a/src/mem/ruby/network/Topology.cc b/src/mem/ruby/network/Topology.cc index 7ccc9e3e2..bfda3c49b 100644 --- a/src/mem/ruby/network/Topology.cc +++ b/src/mem/ruby/network/Topology.cc @@ -89,8 +89,7 @@ Topology::Topology(const Params *p) AbstractController *abs_cntrl = ext_link->params()->ext_node; BasicRouter *router = ext_link->params()->int_node; - // Store the controller and ExtLink pointers for later - m_controller_vector.push_back(abs_cntrl); + // Store the ExtLink pointers for later m_ext_link_vector.push_back(ext_link); int ext_idx1 = abs_cntrl->params()->cntrl_id; @@ -265,22 +264,6 @@ Topology::makeLink(Network *net, SwitchID src, SwitchID dest, } } -void -Topology::printStats(std::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(); - } -} - // The following all-pairs shortest path algorithm is based on the // discussion from Cormen et al., Chapter 26.1. void diff --git a/src/mem/ruby/network/Topology.hh b/src/mem/ruby/network/Topology.hh index 578340ab9..d37341ea1 100644 --- a/src/mem/ruby/network/Topology.hh +++ b/src/mem/ruby/network/Topology.hh @@ -78,8 +78,6 @@ class Topology : public SimObject void initNetworkPtr(Network* net_ptr); const std::string getName() { return m_name; } - void printStats(std::ostream& out) const; - void clearStats(); void print(std::ostream& out) const { out << "[Topology]"; } protected: @@ -99,7 +97,6 @@ class Topology : public SimObject NodeID m_nodes; int m_number_of_switches; - std::vector<AbstractController*> m_controller_vector; std::vector<BasicExtLink*> m_ext_link_vector; std::vector<BasicIntLink*> m_int_link_vector; diff --git a/src/mem/ruby/network/garnet/BaseGarnetNetwork.cc b/src/mem/ruby/network/garnet/BaseGarnetNetwork.cc index e3196a0e7..b66a96989 100644 --- a/src/mem/ruby/network/garnet/BaseGarnetNetwork.cc +++ b/src/mem/ruby/network/garnet/BaseGarnetNetwork.cc @@ -146,7 +146,6 @@ BaseGarnetNetwork::printStats(ostream& out) const printPerformanceStats(out); printLinkStats(out); printPowerStats(out); - m_topology_ptr->printStats(out); } void diff --git a/src/mem/ruby/network/simple/SimpleNetwork.cc b/src/mem/ruby/network/simple/SimpleNetwork.cc index 9df9ed3a5..9a8201a05 100644 --- a/src/mem/ruby/network/simple/SimpleNetwork.cc +++ b/src/mem/ruby/network/simple/SimpleNetwork.cc @@ -304,7 +304,6 @@ 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 @@ -313,7 +312,6 @@ SimpleNetwork::clearStats() for (int i = 0; i < m_switch_ptr_vector.size(); i++) { m_switch_ptr_vector[i]->clearStats(); } - m_topology_ptr->clearStats(); } void |