Polydoros Petrakis has submitted this change. ( https://gem5-review.googlesource.com/c/public/gem5/+/29253 )

Change subject: mem-garnet,mem-ruby: Properly reset garnet2.0 statistics.
......................................................................

mem-garnet,mem-ruby: Properly reset garnet2.0 statistics.

Statistics for crossbar activity, and link related statistics were not getting reset when using m5_reset_stats.

Change-Id: Ib84c55200e4a86c6f9190de28498112bd43dde9d
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/29253
Reviewed-by: Jason Lowe-Power <power...@gmail.com>
Reviewed-by: Srikant Bharadwaj <srikant.bharad...@amd.com>
Maintainer: Jason Lowe-Power <power...@gmail.com>
Tested-by: kokoro <noreply+kok...@google.com>
---
M src/mem/ruby/network/garnet2.0/GarnetNetwork.cc
M src/mem/ruby/network/garnet2.0/GarnetNetwork.hh
M src/mem/ruby/system/RubySystem.cc
3 files changed, 16 insertions(+), 0 deletions(-)

Approvals:
Jason Lowe-Power: Looks good to me, but someone else must approve; Looks good to me, approved
  Srikant Bharadwaj: Looks good to me, approved
  kokoro: Regressions pass



diff --git a/src/mem/ruby/network/garnet2.0/GarnetNetwork.cc b/src/mem/ruby/network/garnet2.0/GarnetNetwork.cc
index 1eff921..8f226b1 100644
--- a/src/mem/ruby/network/garnet2.0/GarnetNetwork.cc
+++ b/src/mem/ruby/network/garnet2.0/GarnetNetwork.cc
@@ -415,6 +415,20 @@
 }

 void
+GarnetNetwork::resetStats()
+{
+    for (int i = 0; i < m_routers.size(); i++) {
+        m_routers[i]->resetStats();
+    }
+    for (int i = 0; i < m_networklinks.size(); i++) {
+        m_networklinks[i]->resetStats();
+    }
+    for (int i = 0; i < m_creditlinks.size(); i++) {
+        m_creditlinks[i]->resetStats();
+    }
+}
+
+void
 GarnetNetwork::print(ostream& out) const
 {
     out << "[GarnetNetwork]";
diff --git a/src/mem/ruby/network/garnet2.0/GarnetNetwork.hh b/src/mem/ruby/network/garnet2.0/GarnetNetwork.hh
index 9acbeef..3821dd8 100644
--- a/src/mem/ruby/network/garnet2.0/GarnetNetwork.hh
+++ b/src/mem/ruby/network/garnet2.0/GarnetNetwork.hh
@@ -101,6 +101,7 @@
     // Stats
     void collateStats();
     void regStats();
+    void resetStats();
     void print(std::ostream& out) const;

     // increment counters
diff --git a/src/mem/ruby/system/RubySystem.cc b/src/mem/ruby/system/RubySystem.cc
index 57d4966..2aeff8c 100644
--- a/src/mem/ruby/system/RubySystem.cc
+++ b/src/mem/ruby/system/RubySystem.cc
@@ -407,6 +407,7 @@
 RubySystem::resetStats()
 {
     m_start_cycle = curCycle();
+    m_network->resetStats();
 }

 bool

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/29253
To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: Ib84c55200e4a86c6f9190de28498112bd43dde9d
Gerrit-Change-Number: 29253
Gerrit-PatchSet: 3
Gerrit-Owner: Polydoros Petrakis <ppet...@ics.forth.gr>
Gerrit-Reviewer: Jason Lowe-Power <power...@gmail.com>
Gerrit-Reviewer: Polydoros Petrakis <ppet...@ics.forth.gr>
Gerrit-Reviewer: Srikant Bharadwaj <srikant.bharad...@amd.com>
Gerrit-Reviewer: kokoro <noreply+kok...@google.com>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Reply via email to