Hoa Nguyen has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/38915 )

Change subject: sim: Rename the root stats group to RootStats
......................................................................

sim: Rename the root stats group to RootStats

Currently, the name of the stats group of thr Root object is
Stats, which is likely to be confused with the Stats namespace.

This commit renames the struct to RootStats. This allows the
Stats namespace to be expressed as `Stats::`, which is
consistent with how the namespace is accessed in other part of
gem5.

Change-Id: Ieb425c3df1f5c0d5f11b1a467a36b2e0e07b2771
Signed-off-by: Hoa Nguyen <[email protected]>
---
M src/sim/root.cc
M src/sim/root.hh
2 files changed, 18 insertions(+), 18 deletions(-)



diff --git a/src/sim/root.cc b/src/sim/root.cc
index d9098a6..7ca84bf 100644
--- a/src/sim/root.cc
+++ b/src/sim/root.cc
@@ -49,10 +49,10 @@
 #include "sim/root.hh"

 Root *Root::_root = NULL;
-Root::Stats Root::Stats::instance;
-Root::Stats &rootStats = Root::Stats::instance;
+Root::RootStats Root::RootStats::instance;
+Root::RootStats &rootStats = Root::RootStats::instance;

-Root::Stats::Stats()
+Root::RootStats::RootStats()
     : Stats::Group(nullptr),
     simSeconds(this, "sim_seconds", "Number of seconds simulated"),
     simTicks(this, "sim_ticks", "Number of ticks simulated"),
@@ -92,7 +92,7 @@
 }

 void
-Root::Stats::resetStats()
+Root::RootStats::resetStats()
 {
     statTime.setTimer();
     startTick = curTick();
@@ -180,7 +180,7 @@
     // stat formulas. The most convenient way to implement that is by
     // having a single global stat group for global stats. Merge that
     // group into the root object here.
-    mergeStatGroup(&Root::Stats::instance);
+    mergeStatGroup(&Root::RootStats::instance);
 }

 void
diff --git a/src/sim/root.hh b/src/sim/root.hh
index fa152ff..b360f3b 100644
--- a/src/sim/root.hh
+++ b/src/sim/root.hh
@@ -90,26 +90,26 @@
     }

   public: // Global statistics
-    struct Stats : public ::Stats::Group
+    struct RootStats : public ::Stats::Group
     {
         void resetStats() override;

-        ::Stats::Formula simSeconds;
-        ::Stats::Value simTicks;
-        ::Stats::Value finalTick;
-        ::Stats::Value simFreq;
-        ::Stats::Value hostSeconds;
+        Stats::Formula simSeconds;
+        Stats::Value simTicks;
+        Stats::Value finalTick;
+        Stats::Value simFreq;
+        Stats::Value hostSeconds;

-        ::Stats::Formula hostTickRate;
-        ::Stats::Value hostMemory;
+        Stats::Formula hostTickRate;
+        Stats::Value hostMemory;

-        static Stats instance;
+        static RootStats instance;

       private:
-        Stats();
+        RootStats();

-        Stats(const Stats &) = delete;
-        Stats &operator=(const Stats &) = delete;
+        RootStats(const RootStats &) = delete;
+        RootStats &operator=(const RootStats &) = delete;

         Time statTime;
         Tick startTick;
@@ -151,6 +151,6 @@
  * Global simulator statistics that are not associated with a
  * specific SimObject.
  */
-extern Root::Stats &rootStats;
+extern Root::RootStats &rootStats;

 #endif // __SIM_ROOT_HH__

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/38915
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: Ieb425c3df1f5c0d5f11b1a467a36b2e0e07b2771
Gerrit-Change-Number: 38915
Gerrit-PatchSet: 1
Gerrit-Owner: Hoa Nguyen <[email protected]>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Reply via email to