summaryrefslogtreecommitdiff
path: root/src/mem/ruby/network/simple
diff options
context:
space:
mode:
Diffstat (limited to 'src/mem/ruby/network/simple')
-rw-r--r--src/mem/ruby/network/simple/SimpleNetwork.cc3
-rw-r--r--src/mem/ruby/network/simple/SimpleNetwork.hh4
-rw-r--r--src/mem/ruby/network/simple/Switch.cc3
-rw-r--r--src/mem/ruby/network/simple/Switch.hh5
-rw-r--r--src/mem/ruby/network/simple/Throttle.cc3
-rw-r--r--src/mem/ruby/network/simple/Throttle.hh4
6 files changed, 7 insertions, 15 deletions
diff --git a/src/mem/ruby/network/simple/SimpleNetwork.cc b/src/mem/ruby/network/simple/SimpleNetwork.cc
index 41f587d47..a3848a8e3 100644
--- a/src/mem/ruby/network/simple/SimpleNetwork.cc
+++ b/src/mem/ruby/network/simple/SimpleNetwork.cc
@@ -208,9 +208,6 @@ SimpleNetwork::getThrottles(NodeID id) const
void
SimpleNetwork::regStats()
{
- m_msg_counts.resize(MessageSizeType_NUM);
- m_msg_bytes.resize(MessageSizeType_NUM);
-
for (MessageSizeType type = MessageSizeType_FIRST;
type < MessageSizeType_NUM; ++type) {
m_msg_counts[(unsigned int) type]
diff --git a/src/mem/ruby/network/simple/SimpleNetwork.hh b/src/mem/ruby/network/simple/SimpleNetwork.hh
index 06db20c0b..69aeeffb7 100644
--- a/src/mem/ruby/network/simple/SimpleNetwork.hh
+++ b/src/mem/ruby/network/simple/SimpleNetwork.hh
@@ -111,8 +111,8 @@ class SimpleNetwork : public Network
bool m_adaptive_routing;
//Statistical variables
- std::vector<Stats::Formula> m_msg_counts;
- std::vector<Stats::Formula> m_msg_bytes;
+ Stats::Formula m_msg_counts[MessageSizeType_NUM];
+ Stats::Formula m_msg_bytes[MessageSizeType_NUM];
};
inline std::ostream&
diff --git a/src/mem/ruby/network/simple/Switch.cc b/src/mem/ruby/network/simple/Switch.cc
index c28bbdd86..d5c32016e 100644
--- a/src/mem/ruby/network/simple/Switch.cc
+++ b/src/mem/ruby/network/simple/Switch.cc
@@ -30,7 +30,6 @@
#include "base/cast.hh"
#include "base/stl_helpers.hh"
-#include "mem/protocol/MessageSizeType.hh"
#include "mem/ruby/buffers/MessageBuffer.hh"
#include "mem/ruby/network/simple/PerfectSwitch.hh"
#include "mem/ruby/network/simple/SimpleNetwork.hh"
@@ -44,8 +43,6 @@ using m5::stl_helpers::operator<<;
Switch::Switch(const Params *p) : BasicRouter(p)
{
m_perfect_switch = new PerfectSwitch(m_id, this, p->virt_nets);
- m_msg_counts.resize(MessageSizeType_NUM);
- m_msg_bytes.resize(MessageSizeType_NUM);
}
Switch::~Switch()
diff --git a/src/mem/ruby/network/simple/Switch.hh b/src/mem/ruby/network/simple/Switch.hh
index 47f4c0858..85f1b6d6f 100644
--- a/src/mem/ruby/network/simple/Switch.hh
+++ b/src/mem/ruby/network/simple/Switch.hh
@@ -43,6 +43,7 @@
#include <vector>
#include "mem/packet.hh"
+#include "mem/protocol/MessageSizeType.hh"
#include "mem/ruby/common/TypeDefines.hh"
#include "mem/ruby/network/BasicRouter.hh"
#include "params/Switch.hh"
@@ -92,8 +93,8 @@ class Switch : public BasicRouter
// Statistical variables
Stats::Formula m_avg_utilization;
- std::vector<Stats::Formula> m_msg_counts;
- std::vector<Stats::Formula> m_msg_bytes;
+ Stats::Formula m_msg_counts[MessageSizeType_NUM];
+ Stats::Formula m_msg_bytes[MessageSizeType_NUM];
};
inline std::ostream&
diff --git a/src/mem/ruby/network/simple/Throttle.cc b/src/mem/ruby/network/simple/Throttle.cc
index 4a5616153..88b46e252 100644
--- a/src/mem/ruby/network/simple/Throttle.cc
+++ b/src/mem/ruby/network/simple/Throttle.cc
@@ -80,9 +80,6 @@ Throttle::init(NodeID node, Cycles link_latency,
m_wakeups_wo_switch = 0;
- m_msg_counts.resize(MessageSizeType_NUM);
- m_msg_bytes.resize(MessageSizeType_NUM);
-
m_link_utilization_proxy = 0;
}
diff --git a/src/mem/ruby/network/simple/Throttle.hh b/src/mem/ruby/network/simple/Throttle.hh
index b21af4d64..cdc627bb7 100644
--- a/src/mem/ruby/network/simple/Throttle.hh
+++ b/src/mem/ruby/network/simple/Throttle.hh
@@ -104,8 +104,8 @@ class Throttle : public Consumer
// Statistical variables
Stats::Scalar m_link_utilization;
- std::vector<Stats::Vector> m_msg_counts;
- std::vector<Stats::Formula> m_msg_bytes;
+ Stats::Vector m_msg_counts[MessageSizeType_NUM];
+ Stats::Formula m_msg_bytes[MessageSizeType_NUM];
double m_link_utilization_proxy;
};