diff options
author | Matthew Poremba <matthew.poremba@amd.com> | 2017-01-19 11:58:59 -0500 |
---|---|---|
committer | Matthew Poremba <matthew.poremba@amd.com> | 2017-01-19 11:58:59 -0500 |
commit | a4b546c3a139aeb33f087422637ac06fc4477d11 (patch) | |
tree | c3b977a9cc902943826614f0cbfee3bd0f473be6 /src/mem/ruby/network/MessageBuffer.hh | |
parent | 501f1709240f51d4debbdacb388f2d939aef9ca0 (diff) | |
download | gem5-a4b546c3a139aeb33f087422637ac06fc4477d11.tar.xz |
ruby: Add occupancy stats to MessageBuffers
This patch is an updated version of /r/3297.
"The most important statistic for measuring memory hierarchy performance is
throughput, which is affected by independent variables, buffer sizing and
communication latency. It is difficult/impossible to debug performance issues
through series buffers without knowing which are the bottlenecks. For finite
buffers, this patch adds statistics for the average number of messages in the
buffer, the occupancy of the buffer slots, and number of message stalls."
Diffstat (limited to 'src/mem/ruby/network/MessageBuffer.hh')
-rw-r--r-- | src/mem/ruby/network/MessageBuffer.hh | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/mem/ruby/network/MessageBuffer.hh b/src/mem/ruby/network/MessageBuffer.hh index b1d04ab9a..fc8feb03e 100644 --- a/src/mem/ruby/network/MessageBuffer.hh +++ b/src/mem/ruby/network/MessageBuffer.hh @@ -100,7 +100,7 @@ class MessageBuffer : public SimObject //! Updates the delay cycles of the message at the head of the queue, //! removes it from the queue and returns its total delay. - Tick dequeue(Tick current_time); + Tick dequeue(Tick current_time, bool decrement_messages = true); void recycle(Tick current_time, Tick recycle_latency); bool isEmpty() const { return m_prio_heap.size() == 0; } @@ -189,6 +189,11 @@ class MessageBuffer : public SimObject int m_input_link_id; int m_vnet_id; + + Stats::Average m_buf_msgs; + Stats::Average m_stall_time; + Stats::Scalar m_stall_count; + Stats::Formula m_occupancy; }; Tick random_time(); |