diff options
Diffstat (limited to 'src/mem/ruby/slicc_interface')
4 files changed, 28 insertions, 7 deletions
diff --git a/src/mem/ruby/slicc_interface/AbstractController.cc b/src/mem/ruby/slicc_interface/AbstractController.cc index adf411f82..bcd09796a 100644 --- a/src/mem/ruby/slicc_interface/AbstractController.cc +++ b/src/mem/ruby/slicc_interface/AbstractController.cc @@ -52,6 +52,14 @@ AbstractController::clearStats() { m_requestProfileMap.clear(); m_request_count = 0; + + m_delayHistogram.clear(); + + uint32_t size = Network::getNumberOfVirtualNetworks(); + m_delayVCHistogram.resize(size); + for (uint32_t i = 0; i < size; i++) { + m_delayVCHistogram[i].clear(); + } } void @@ -63,3 +71,11 @@ AbstractController::profileRequest(const std::string &request) // default value which is 0 m_requestProfileMap[request]++; } + +void +AbstractController::profileMsgDelay(uint32_t virtualNetwork, Time delay) +{ + assert(virtualNetwork < m_delayVCHistogram.size()); + m_delayHistogram.add(delay); + m_delayVCHistogram[virtualNetwork].add(delay); +} diff --git a/src/mem/ruby/slicc_interface/AbstractController.hh b/src/mem/ruby/slicc_interface/AbstractController.hh index 0e3af44a1..c452da723 100644 --- a/src/mem/ruby/slicc_interface/AbstractController.hh +++ b/src/mem/ruby/slicc_interface/AbstractController.hh @@ -36,6 +36,7 @@ #include "mem/ruby/common/Address.hh" #include "mem/ruby/common/Consumer.hh" #include "mem/ruby/common/DataBlock.hh" +#include "mem/ruby/common/Histogram.hh" #include "mem/ruby/network/Network.hh" #include "mem/ruby/recorder/CacheRecorder.hh" #include "mem/ruby/system/MachineID.hh" @@ -92,9 +93,15 @@ class AbstractController : public ClockedObject, public Consumer const std::map<std::string, uint64_t>& getRequestProfileMap() const { return m_requestProfileMap; } + Histogram& getDelayHist() { return m_delayHistogram; } + Histogram& getDelayVCHist(uint32_t index) + { return m_delayVCHistogram[index]; } + protected: //! Profiles original cache requests including PUTs void profileRequest(const std::string &request); + //! Profiles the delay associated with messages. + void profileMsgDelay(uint32_t virtualNetwork, Time delay); protected: int m_transitions_per_cycle; @@ -121,6 +128,11 @@ class AbstractController : public ClockedObject, public Consumer //! call requisite function for updating the count. std::map<std::string, uint64_t> m_requestProfileMap; uint64_t m_request_count; + + //! Histogram for profiling delay for the messages this controller + //! cares for + Histogram m_delayHistogram; + std::vector<Histogram> m_delayVCHistogram; }; #endif // __MEM_RUBY_SLICC_INTERFACE_ABSTRACTCONTROLLER_HH__ diff --git a/src/mem/ruby/slicc_interface/RubySlicc_Profiler_interface.cc b/src/mem/ruby/slicc_interface/RubySlicc_Profiler_interface.cc index b8503c2cb..a8d8198ca 100644 --- a/src/mem/ruby/slicc_interface/RubySlicc_Profiler_interface.cc +++ b/src/mem/ruby/slicc_interface/RubySlicc_Profiler_interface.cc @@ -56,12 +56,6 @@ profile_sharing(const Address& addr, AccessType type, NodeID requestor, } void -profileMsgDelay(uint32_t virtualNetwork, Time delayCycles) -{ - g_system_ptr->getProfiler()->profileMsgDelay(virtualNetwork, delayCycles); -} - -void profileGetX(const Address& datablock, const Address& PC, const Set& owner, const Set& sharers, NodeID requestor) { diff --git a/src/mem/ruby/slicc_interface/RubySlicc_Profiler_interface.hh b/src/mem/ruby/slicc_interface/RubySlicc_Profiler_interface.hh index 1796d9442..bfc0afd56 100644 --- a/src/mem/ruby/slicc_interface/RubySlicc_Profiler_interface.hh +++ b/src/mem/ruby/slicc_interface/RubySlicc_Profiler_interface.hh @@ -51,7 +51,6 @@ void profile_token_retry(const Address& addr, AccessType type, int count); void profile_filter_action(int action); void profile_persistent_prediction(const Address& addr, AccessType type); void profile_average_latency_estimate(int latency); -void profileMsgDelay(uint32_t virtualNetwork, Time delayCycles); void profile_multicast_retry(const Address& addr, int count); void profileGetX(const Address& datablock, const Address& PC, const Set& owner, |