Daniel Carvalho has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/45415 )

Change subject: base-stats: Rename Units namespace as units
......................................................................

base-stats: Rename Units namespace as units

As part of recent decisions regarding namespace
naming conventions, all namespaces will be changed
to snake case.

Stats::Units became Stats::units.

Change-Id: I9ce855b291db122d952098a090a2984b42152850
Signed-off-by: Daniel R. Carvalho <[email protected]>
---
M src/base/statistics.cc
M src/base/statistics.hh
M src/base/stats/info.hh
M src/base/stats/units.hh
M src/base/stats/units.test.cc
M src/cpu/base.cc
M src/cpu/minor/stats.cc
M src/cpu/o3/cpu.cc
M src/cpu/o3/fetch_impl.hh
M src/cpu/o3/iew_impl.hh
M src/cpu/o3/inst_queue_impl.hh
M src/cpu/testers/traffic_gen/base.cc
M src/cpu/trace/trace_cpu.cc
M src/dev/arm/smmu_v3_caches.cc
M src/dev/arm/ufs_device.cc
M src/dev/net/etherdevice.cc
M src/dev/net/sinic.cc
M src/mem/abstract_mem.cc
M src/mem/cache/base.cc
M src/mem/cache/compressors/base.cc
M src/mem/cache/tags/base.cc
M src/mem/comm_monitor.cc
M src/mem/mem_ctrl.cc
M src/mem/mem_interface.cc
M src/sim/root.cc
25 files changed, 178 insertions(+), 176 deletions(-)



diff --git a/src/base/statistics.cc b/src/base/statistics.cc
index fd44e16..e4cb8a5 100644
--- a/src/base/statistics.cc
+++ b/src/base/statistics.cc
@@ -138,7 +138,7 @@
 {
 }

-Formula::Formula(Group *parent, const char *name, const Units::Base *unit,
+Formula::Formula(Group *parent, const char *name, const units::Base *unit,
                  const char *desc)
     : DataWrapVec<Formula, FormulaInfoProxy>(parent, name, unit, desc)
 {
@@ -152,7 +152,7 @@
     *this = r;
 }

-Formula::Formula(Group *parent, const char *name, const Units::Base *unit,
+Formula::Formula(Group *parent, const char *name, const units::Base *unit,
                  const char *desc, const Temp &r)
     : DataWrapVec<Formula, FormulaInfoProxy>(parent, name, unit, desc)
 {
diff --git a/src/base/statistics.hh b/src/base/statistics.hh
index e96cc7b..6894901 100644
--- a/src/base/statistics.hh
+++ b/src/base/statistics.hh
@@ -242,7 +242,7 @@
     DataWrap(const DataWrap &) = delete;
     DataWrap &operator=(const DataWrap &) = delete;

-    DataWrap(Group *parent, const char *name, const Units::Base *unit,
+    DataWrap(Group *parent, const char *name, const units::Base *unit,
              const char *desc)
     {
         auto info = new Info(self());
@@ -308,7 +308,7 @@
      * @return A reference to this stat.
      */
     Derived &
-    unit(const Units::Base *_unit)
+    unit(const units::Base *_unit)
     {
         this->info()->unit = _unit;
         return this->self();
@@ -373,7 +373,7 @@
     typedef InfoProxyType<Derived> Info;

     DataWrapVec(Group *parent = nullptr, const char *name = nullptr,
-                const Units::Base *unit = UNIT_UNSPECIFIED,
+                const units::Base *unit = UNIT_UNSPECIFIED,
                 const char *desc = nullptr)
         : DataWrap<Derived, InfoProxyType>(parent, name, unit, desc)
     {}
@@ -455,7 +455,7 @@
     typedef InfoProxyType<Derived> Info;

     DataWrapVec2d(Group *parent, const char *name,
-                  const Units::Base *unit, const char *desc)
+                  const units::Base *unit, const char *desc)
         : DataWrapVec<Derived, InfoProxyType>(parent, name, unit, desc)
     {
     }
@@ -550,7 +550,7 @@

   public:
     ScalarBase(Group *parent = nullptr, const char *name = nullptr,
-               const Units::Base *unit = UNIT_UNSPECIFIED,
+               const units::Base *unit = UNIT_UNSPECIFIED,
                const char *desc = nullptr)
         : DataWrap<Derived, ScalarInfoProxy>(parent, name, unit, desc)
     {
@@ -708,7 +708,7 @@

   public:
     ValueBase(Group *parent, const char *name,
-              const Units::Base *unit,
+              const units::Base *unit,
               const char *desc)
         : DataWrap<Derived, ScalarInfoProxy>(parent, name, unit, desc),
           proxy(NULL)
@@ -1012,7 +1012,7 @@

   public:
     VectorBase(Group *parent, const char *name,
-               const Units::Base *unit,
+               const units::Base *unit,
                const char *desc)
         : DataWrapVec<Derived, VectorInfoProxy>(parent, name, unit, desc),
           storage(nullptr), _size(0)
@@ -1155,7 +1155,7 @@

   public:
     Vector2dBase(Group *parent, const char *name,
-                 const Units::Base *unit,
+                 const units::Base *unit,
                  const char *desc)
: DataWrapVec2d<Derived, Vector2dInfoProxy>(parent, name, unit, desc),
           x(0), y(0), _size(0), storage(nullptr)
@@ -1316,7 +1316,7 @@

   public:
     DistBase(Group *parent, const char *name,
-             const Units::Base *unit,
+             const units::Base *unit,
              const char *desc)
         : DataWrap<Derived, DistInfoProxy>(parent, name, unit, desc)
     {
@@ -1414,7 +1414,7 @@

   public:
     VectorDistBase(Group *parent, const char *name,
-                   const Units::Base *unit,
+                   const units::Base *unit,
                    const char *desc)
: DataWrapVec<Derived, VectorDistInfoProxy>(parent, name, unit, desc),
           storage(NULL)
@@ -1955,7 +1955,7 @@
     {
     }

-    Scalar(Group *parent, const char *name, const Units::Base *unit,
+    Scalar(Group *parent, const char *name, const units::Base *unit,
            const char *desc = nullptr)
         : ScalarBase<Scalar, StatStor>(parent, name, unit, desc)
     {
@@ -1982,7 +1982,7 @@
     {
     }

-    Average(Group *parent, const char *name, const Units::Base *unit,
+    Average(Group *parent, const char *name, const units::Base *unit,
             const char *desc = nullptr)
         : ScalarBase<Average, AvgStor>(parent, name, unit, desc)
     {
@@ -2002,7 +2002,7 @@
     {
     }

-    Value(Group *parent, const char *name, const Units::Base *unit,
+    Value(Group *parent, const char *name, const units::Base *unit,
           const char *desc = nullptr)
         : ValueBase<Value>(parent, name, unit, desc)
     {
@@ -2027,7 +2027,7 @@
     {
     }

-    Vector(Group *parent, const char *name, const Units::Base *unit,
+    Vector(Group *parent, const char *name, const units::Base *unit,
            const char *desc = nullptr)
         : VectorBase<Vector, StatStor>(parent, name, unit, desc)
     {
@@ -2053,7 +2053,7 @@
     {
     }

-    AverageVector(Group *parent, const char *name, const Units::Base *unit,
+    AverageVector(Group *parent, const char *name, const units::Base *unit,
                   const char *desc = nullptr)
         : VectorBase<AverageVector, AvgStor>(parent, name, unit, desc)
     {
@@ -2079,7 +2079,7 @@
     {
     }

-    Vector2d(Group *parent, const char *name, const Units::Base *unit,
+    Vector2d(Group *parent, const char *name, const units::Base *unit,
              const char *desc = nullptr)
         : Vector2dBase<Vector2d, StatStor>(parent, name, unit, desc)
     {
@@ -2105,7 +2105,7 @@
     {
     }

-    Distribution(Group *parent, const char *name, const Units::Base *unit,
+    Distribution(Group *parent, const char *name, const units::Base *unit,
                  const char *desc = nullptr)
         : DistBase<Distribution, DistStor>(parent, name, unit, desc)
     {
@@ -2147,7 +2147,7 @@
     {
     }

-    Histogram(Group *parent, const char *name, const Units::Base *unit,
+    Histogram(Group *parent, const char *name, const units::Base *unit,
               const char *desc = nullptr)
         : DistBase<Histogram, HistStor>(parent, name, unit, desc)
     {
@@ -2197,7 +2197,7 @@
         this->setParams(params);
     }

- StandardDeviation(Group *parent, const char *name, const Units::Base *unit, + StandardDeviation(Group *parent, const char *name, const units::Base *unit,
                       const char *desc = nullptr)
         : DistBase<StandardDeviation, SampleStor>(parent, name, unit, desc)
     {
@@ -2236,7 +2236,7 @@
         this->setParams(params);
     }

- AverageDeviation(Group *parent, const char *name, const Units::Base *unit, + AverageDeviation(Group *parent, const char *name, const units::Base *unit,
                      const char *desc = nullptr)
: DistBase<AverageDeviation, AvgSampleStor>(parent, name, unit, desc)
     {
@@ -2267,7 +2267,7 @@
     }

     VectorDistribution(Group *parent, const char *name,
-                       const Units::Base *unit,
+                       const units::Base *unit,
                        const char *desc = nullptr)
         : VectorDistBase<VectorDistribution, DistStor>(parent, name, unit,
                                                        desc)
@@ -2314,7 +2314,7 @@
     }

     VectorStandardDeviation(Group *parent, const char *name,
-                            const Units::Base *unit,
+                            const units::Base *unit,
                             const char *desc = nullptr)
         : VectorDistBase<VectorStandardDeviation, SampleStor>(parent, name,
                                                               unit, desc)
@@ -2358,7 +2358,7 @@
     }

     VectorAverageDeviation(Group *parent, const char *name,
-                           const Units::Base *unit,
+                           const units::Base *unit,
                            const char *desc = nullptr)
: VectorDistBase<VectorAverageDeviation, AvgSampleStor>(parent, name,
             unit, desc)
@@ -2457,7 +2457,7 @@

   public:
     SparseHistBase(Group *parent, const char *name,
-                   const Units::Base *unit,
+                   const units::Base *unit,
                    const char *desc)
         : DataWrap<Derived, SparseHistInfoProxy>(parent, name, unit, desc)
     {
@@ -2516,7 +2516,7 @@
     {
     }

- SparseHistogram(Group *parent, const char *name, const Units::Base *unit, + SparseHistogram(Group *parent, const char *name, const units::Base *unit,
                     const char *desc = nullptr)
: SparseHistBase<SparseHistogram, SparseHistStor>(parent, name, unit,
                                                           desc)
@@ -2558,13 +2558,13 @@
     Formula(Group *parent = nullptr, const char *name = nullptr,
             const char *desc = nullptr);

-    Formula(Group *parent, const char *name, const Units::Base *unit,
+    Formula(Group *parent, const char *name, const units::Base *unit,
             const char *desc = nullptr);

     Formula(Group *parent, const char *name, const char *desc,
             const Temp &r);

-    Formula(Group *parent, const char *name, const Units::Base *unit,
+    Formula(Group *parent, const char *name, const units::Base *unit,
             const char *desc, const Temp &r);

     /**
diff --git a/src/base/stats/info.hh b/src/base/stats/info.hh
index 0568aa4..29ff7ef 100644
--- a/src/base/stats/info.hh
+++ b/src/base/stats/info.hh
@@ -75,7 +75,7 @@
     /** The separator string used for vectors, dist, etc. */
     static std::string separatorString;
     /** The unit of the stat. */
-    const Units::Base* unit = UNIT_UNSPECIFIED;
+    const units::Base* unit = UNIT_UNSPECIFIED;
     /** The description of the stat. */
     std::string desc;
     /** The formatting flags. */
diff --git a/src/base/stats/units.hh b/src/base/stats/units.hh
index 87e6025..8671651 100644
--- a/src/base/stats/units.hh
+++ b/src/base/stats/units.hh
@@ -31,24 +31,25 @@

 #include <type_traits>

+#include "base/compiler.hh"
 #include "base/cprintf.hh"

 /**
  * Convenience macros to declare the unit of a stat.
  */
-#define UNIT_CYCLE Stats::Units::Cycle::get()
-#define UNIT_TICK Stats::Units::Tick::get()
-#define UNIT_SECOND Stats::Units::Second::get()
-#define UNIT_BIT Stats::Units::Bit::get()
-#define UNIT_BYTE Stats::Units::Byte::get()
-#define UNIT_JOULE Stats::Units::Joule::get()
-#define UNIT_VOLT Stats::Units::Volt::get()
-#define UNIT_CELSIUS Stats::Units::DegreeCelsius::get()
-#define UNIT_RATE(T1, T2) Stats::Units::Rate<T1, T2>::get()
-#define UNIT_RATIO Stats::Units::Ratio::get()
-#define UNIT_COUNT Stats::Units::Count::get()
-#define UNIT_WATT Stats::Units::Watt::get()
-#define UNIT_UNSPECIFIED Stats::Units::Unspecified::get()
+#define UNIT_CYCLE Stats::units::Cycle::get()
+#define UNIT_TICK Stats::units::Tick::get()
+#define UNIT_SECOND Stats::units::Second::get()
+#define UNIT_BIT Stats::units::Bit::get()
+#define UNIT_BYTE Stats::units::Byte::get()
+#define UNIT_JOULE Stats::units::Joule::get()
+#define UNIT_VOLT Stats::units::Volt::get()
+#define UNIT_CELSIUS Stats::units::DegreeCelsius::get()
+#define UNIT_RATE(T1, T2) Stats::units::Rate<T1, T2>::get()
+#define UNIT_RATIO Stats::units::Ratio::get()
+#define UNIT_COUNT Stats::units::Count::get()
+#define UNIT_WATT Stats::units::Watt::get()
+#define UNIT_UNSPECIFIED Stats::units::Unspecified::get()

 namespace Stats {

@@ -83,7 +84,8 @@
  *   - The new unit is significant enough to be not included in Count unit.
  *     (e.g. Cycle unit, Tick unit)
  */
-namespace Units {
+GEM5_DEPRECATED_NAMESPACE(Units, units);
+namespace units {

 /**
  * The Base class is the parent class of all unit classes.
@@ -314,9 +316,9 @@
 class Rate : public Base
 {
     static_assert(std::is_base_of<Base, T1>::value,
-        "Rate(T1,T2) must have T1 and T2 derived from Stats::Units::Base");
+        "Rate(T1,T2) must have T1 and T2 derived from Stats::units::Base");
     static_assert(std::is_base_of<Base, T2>::value,
-        "Rate(T1,T2) must have T1 and T2 derived from Stats::Units::Base");
+        "Rate(T1,T2) must have T1 and T2 derived from Stats::units::Base");
     static_assert(!std::is_same<T1, T2>::value ||
std::is_same<T1, Count>::value || std::is_same<T1, Unspecified>::value,
         "Rate(T1,T2) must have T1 and T2 of different types; "
@@ -345,7 +347,7 @@
     }
 };

-} // namespace Units
+} // namespace units

 } // namespace Stats

diff --git a/src/base/stats/units.test.cc b/src/base/stats/units.test.cc
index e95177d..934ca3a 100644
--- a/src/base/stats/units.test.cc
+++ b/src/base/stats/units.test.cc
@@ -33,103 +33,103 @@

 TEST(StatsUnitsTest, Cycle)
 {
-    Stats::Units::Cycle *unit = UNIT_CYCLE;
-    ASSERT_EQ(unit->getUnitString(), Stats::Units::Cycle::toString());
+    Stats::units::Cycle *unit = UNIT_CYCLE;
+    ASSERT_EQ(unit->getUnitString(), Stats::units::Cycle::toString());
 }

 TEST(StatsUnitsTest, Tick)
 {
-    Stats::Units::Tick *unit = UNIT_TICK;
-    ASSERT_EQ(unit->getUnitString(), Stats::Units::Tick::toString());
+    Stats::units::Tick *unit = UNIT_TICK;
+    ASSERT_EQ(unit->getUnitString(), Stats::units::Tick::toString());
 }

 TEST(StatsUnitsTest, Second)
 {
-    Stats::Units::Second *unit = UNIT_SECOND;
-    ASSERT_EQ(unit->getUnitString(), Stats::Units::Second::toString());
+    Stats::units::Second *unit = UNIT_SECOND;
+    ASSERT_EQ(unit->getUnitString(), Stats::units::Second::toString());
 }

 TEST(StatsUnitsTest, Bit)
 {
-    Stats::Units::Bit *unit = UNIT_BIT;
-    ASSERT_EQ(unit->getUnitString(), Stats::Units::Bit::toString());
+    Stats::units::Bit *unit = UNIT_BIT;
+    ASSERT_EQ(unit->getUnitString(), Stats::units::Bit::toString());
 }

 TEST(StatsUnitsTest, Byte)
 {
-    Stats::Units::Byte *unit = UNIT_BYTE;
-    ASSERT_EQ(unit->getUnitString(), Stats::Units::Byte::toString());
+    Stats::units::Byte *unit = UNIT_BYTE;
+    ASSERT_EQ(unit->getUnitString(), Stats::units::Byte::toString());
 }

 TEST(StatsUnitsTest, Watt)
 {
-    Stats::Units::Watt *unit = UNIT_WATT;
-    ASSERT_EQ(unit->getUnitString(), Stats::Units::Watt::toString());
+    Stats::units::Watt *unit = UNIT_WATT;
+    ASSERT_EQ(unit->getUnitString(), Stats::units::Watt::toString());
 }

 TEST(StatsUnitsTest, Joule)
 {
-    Stats::Units::Joule *unit = UNIT_JOULE;
-    ASSERT_EQ(unit->getUnitString(), Stats::Units::Joule::toString());
+    Stats::units::Joule *unit = UNIT_JOULE;
+    ASSERT_EQ(unit->getUnitString(), Stats::units::Joule::toString());
 }

 TEST(StatsUnitsTest, Volt)
 {
-    Stats::Units::Volt *unit = UNIT_VOLT;
-    ASSERT_EQ(unit->getUnitString(), Stats::Units::Volt::toString());
+    Stats::units::Volt *unit = UNIT_VOLT;
+    ASSERT_EQ(unit->getUnitString(), Stats::units::Volt::toString());
 }

 TEST(StatsUnitsTest, DegreeCelsius)
 {
-    Stats::Units::DegreeCelsius *unit = UNIT_CELSIUS;
- ASSERT_EQ(unit->getUnitString(), Stats::Units::DegreeCelsius::toString());
+    Stats::units::DegreeCelsius *unit = UNIT_CELSIUS;
+ ASSERT_EQ(unit->getUnitString(), Stats::units::DegreeCelsius::toString());
 }

 TEST(StatsUnitsTest, Count)
 {
-    Stats::Units::Count *unit = UNIT_COUNT;
-    ASSERT_EQ(unit->getUnitString(), Stats::Units::Count::toString());
+    Stats::units::Count *unit = UNIT_COUNT;
+    ASSERT_EQ(unit->getUnitString(), Stats::units::Count::toString());
 }

 TEST(StatsUnitsTest, Rate1)
 {
-    Stats::Units::Rate<Stats::Units::Count, Stats::Units::Count> *unit =
-        UNIT_RATE(Stats::Units::Count, Stats::Units::Count);
+    Stats::units::Rate<Stats::units::Count, Stats::units::Count> *unit =
+        UNIT_RATE(Stats::units::Count, Stats::units::Count);
     ASSERT_EQ(unit->getUnitString(), "(Count/Count)");
- ASSERT_EQ(unit->getUnitString(), (Stats::Units::Rate<Stats::Units::Count,
-        Stats::Units::Count>::toString()));
+ ASSERT_EQ(unit->getUnitString(), (Stats::units::Rate<Stats::units::Count,
+        Stats::units::Count>::toString()));
 }

 TEST(StatsUnitsTest, Rate2)
 {
-    Stats::Units::Rate<Stats::Units::Tick, Stats::Units::Second> *unit =
-        UNIT_RATE(Stats::Units::Tick, Stats::Units::Second);
+    Stats::units::Rate<Stats::units::Tick, Stats::units::Second> *unit =
+        UNIT_RATE(Stats::units::Tick, Stats::units::Second);
     ASSERT_EQ(unit->getUnitString(), "(Tick/Second)");
- ASSERT_EQ(unit->getUnitString(), (Stats::Units::Rate<Stats::Units::Tick,
-        Stats::Units::Second>::toString()));
+ ASSERT_EQ(unit->getUnitString(), (Stats::units::Rate<Stats::units::Tick,
+        Stats::units::Second>::toString()));
 }

 TEST(StatsUnitsTest, RateOfRates)
 {
-    typedef Stats::Units::Rate<Stats::Units::Bit, Stats::Units::Second>
+    typedef Stats::units::Rate<Stats::units::Bit, Stats::units::Second>
         BitPerSecond;
-    typedef Stats::Units::Rate<Stats::Units::Count, Stats::Units::Cycle>
+    typedef Stats::units::Rate<Stats::units::Count, Stats::units::Cycle>
         CountPerCycle;
-    Stats::Units::Rate<BitPerSecond, CountPerCycle> *unit =
+    Stats::units::Rate<BitPerSecond, CountPerCycle> *unit =
         UNIT_RATE(BitPerSecond, CountPerCycle);
     ASSERT_EQ(unit->getUnitString(), "((Bit/Second)/(Count/Cycle))");
     ASSERT_EQ(unit->getUnitString(),
-        (Stats::Units::Rate<BitPerSecond, CountPerCycle>::toString()));
+        (Stats::units::Rate<BitPerSecond, CountPerCycle>::toString()));
 }

 TEST(StatsUnitsTest, Ratio)
 {
-    Stats::Units::Ratio *unit = UNIT_RATIO;
-    ASSERT_EQ(unit->getUnitString(), Stats::Units::Ratio::toString());
+    Stats::units::Ratio *unit = UNIT_RATIO;
+    ASSERT_EQ(unit->getUnitString(), Stats::units::Ratio::toString());
 }

 TEST(StatsUnitsTest, Unspecified)
 {
-    Stats::Units::Unspecified *unit = UNIT_UNSPECIFIED;
- ASSERT_EQ(unit->getUnitString(), Stats::Units::Unspecified::toString());
+    Stats::units::Unspecified *unit = UNIT_UNSPECIFIED;
+ ASSERT_EQ(unit->getUnitString(), Stats::units::Unspecified::toString());
 }
diff --git a/src/cpu/base.cc b/src/cpu/base.cc
index 8f211a0..750f9ee 100644
--- a/src/cpu/base.cc
+++ b/src/cpu/base.cc
@@ -737,10 +737,10 @@
     ADD_STAT(simOps, UNIT_COUNT,
              "Number of ops (including micro ops) simulated"),
     ADD_STAT(hostInstRate,
-             UNIT_RATE(Stats::Units::Count, Stats::Units::Second),
+             UNIT_RATE(Stats::units::Count, Stats::units::Second),
              "Simulator instruction rate (inst/s)"),
     ADD_STAT(hostOpRate,
-             UNIT_RATE(Stats::Units::Count, Stats::Units::Second),
+             UNIT_RATE(Stats::units::Count, Stats::units::Second),
              "Simulator op (including micro ops) rate (op/s)")
 {
     simInsts
diff --git a/src/cpu/minor/stats.cc b/src/cpu/minor/stats.cc
index 8c29cd4..114ec16 100644
--- a/src/cpu/minor/stats.cc
+++ b/src/cpu/minor/stats.cc
@@ -53,9 +53,9 @@
     ADD_STAT(quiesceCycles, UNIT_CYCLE,
"Total number of cycles that CPU has spent quiesced or waiting "
              "for an interrupt"),
-    ADD_STAT(cpi, UNIT_RATE(Stats::Units::Cycle, Stats::Units::Count),
+    ADD_STAT(cpi, UNIT_RATE(Stats::units::Cycle, Stats::units::Count),
              "CPI: cycles per instruction"),
-    ADD_STAT(ipc, UNIT_RATE(Stats::Units::Count, Stats::Units::Cycle),
+    ADD_STAT(ipc, UNIT_RATE(Stats::units::Count, Stats::units::Cycle),
              "IPC: instructions per cycle"),
ADD_STAT(committedInstType, UNIT_COUNT, "Class of committed instruction")
 {
diff --git a/src/cpu/o3/cpu.cc b/src/cpu/o3/cpu.cc
index 5b42bdb..6fa85df 100644
--- a/src/cpu/o3/cpu.cc
+++ b/src/cpu/o3/cpu.cc
@@ -403,13 +403,13 @@
ADD_STAT(committedInsts, UNIT_COUNT, "Number of Instructions Simulated"),
       ADD_STAT(committedOps, UNIT_COUNT,
                "Number of Ops (including micro ops) Simulated"),
-      ADD_STAT(cpi, UNIT_RATE(Stats::Units::Cycle, Stats::Units::Count),
+      ADD_STAT(cpi, UNIT_RATE(Stats::units::Cycle, Stats::units::Count),
                "CPI: Cycles Per Instruction"),
- ADD_STAT(totalCpi, UNIT_RATE(Stats::Units::Cycle, Stats::Units::Count), + ADD_STAT(totalCpi, UNIT_RATE(Stats::units::Cycle, Stats::units::Count),
                "CPI: Total CPI of All Threads"),
-      ADD_STAT(ipc, UNIT_RATE(Stats::Units::Count, Stats::Units::Cycle),
+      ADD_STAT(ipc, UNIT_RATE(Stats::units::Count, Stats::units::Cycle),
                "IPC: Instructions Per Cycle"),
- ADD_STAT(totalIpc, UNIT_RATE(Stats::Units::Count, Stats::Units::Cycle), + ADD_STAT(totalIpc, UNIT_RATE(Stats::units::Count, Stats::units::Cycle),
                "IPC: Total IPC of All Threads"),
ADD_STAT(intRegfileReads, UNIT_COUNT, "Number of integer regfile reads"),
       ADD_STAT(intRegfileWrites, UNIT_COUNT,
diff --git a/src/cpu/o3/fetch_impl.hh b/src/cpu/o3/fetch_impl.hh
index 0376451..d71adcc 100644
--- a/src/cpu/o3/fetch_impl.hh
+++ b/src/cpu/o3/fetch_impl.hh
@@ -201,7 +201,7 @@
              idleCycles / cpu->baseStats.numCycles),
     ADD_STAT(branchRate, UNIT_RATIO, "Number of branch fetches per cycle",
              branches / cpu->baseStats.numCycles),
-    ADD_STAT(rate, UNIT_RATE(Stats::Units::Count, Stats::Units::Cycle),
+    ADD_STAT(rate, UNIT_RATE(Stats::units::Count, Stats::units::Cycle),
              "Number of inst fetches per cycle",
              insts / cpu->baseStats.numCycles)
 {
diff --git a/src/cpu/o3/iew_impl.hh b/src/cpu/o3/iew_impl.hh
index 5593074..ed1cc07 100644
--- a/src/cpu/o3/iew_impl.hh
+++ b/src/cpu/o3/iew_impl.hh
@@ -178,9 +178,9 @@
              "Number of instructions producing a value"),
     ADD_STAT(consumerInst, UNIT_COUNT,
              "Number of instructions consuming a value"),
-    ADD_STAT(wbRate, UNIT_RATE(Stats::Units::Count, Stats::Units::Cycle),
+    ADD_STAT(wbRate, UNIT_RATE(Stats::units::Count, Stats::units::Cycle),
              "Insts written-back per cycle"),
-    ADD_STAT(wbFanout, UNIT_RATE(Stats::Units::Count, Stats::Units::Count),
+    ADD_STAT(wbFanout, UNIT_RATE(Stats::units::Count, Stats::units::Count),
              "Average fanout of values written-back")
 {
     instsToCommit
@@ -221,7 +221,7 @@
ADD_STAT(numRefs, UNIT_COUNT, "Number of memory reference insts executed"),
     ADD_STAT(numBranches, UNIT_COUNT, "Number of branches executed"),
     ADD_STAT(numStoreInsts, UNIT_COUNT, "Number of stores executed"),
-    ADD_STAT(numRate, UNIT_RATE(Stats::Units::Count, Stats::Units::Cycle),
+    ADD_STAT(numRate, UNIT_RATE(Stats::units::Count, Stats::units::Cycle),
              "Inst execution rate", numInsts / cpu->baseStats.numCycles)
 {
     numLoadInsts
diff --git a/src/cpu/o3/inst_queue_impl.hh b/src/cpu/o3/inst_queue_impl.hh
index 5d1b305..b584f63 100644
--- a/src/cpu/o3/inst_queue_impl.hh
+++ b/src/cpu/o3/inst_queue_impl.hh
@@ -208,10 +208,10 @@
              "attempts to use FU when none available"),
     ADD_STAT(statIssuedInstType, UNIT_COUNT,
              "Number of instructions issued per FU type, per thread"),
- ADD_STAT(issueRate, UNIT_RATE(Stats::Units::Count, Stats::Units::Cycle), + ADD_STAT(issueRate, UNIT_RATE(Stats::units::Count, Stats::units::Cycle),
              "Inst issue rate", instsIssued / cpu->baseStats.numCycles),
     ADD_STAT(fuBusy, UNIT_COUNT, "FU busy when requested"),
- ADD_STAT(fuBusyRate, UNIT_RATE(Stats::Units::Count, Stats::Units::Count), + ADD_STAT(fuBusyRate, UNIT_RATE(Stats::units::Count, Stats::units::Count),
              "FU busy rate (busy events/executed inst)")
 {
     instsAdded
diff --git a/src/cpu/testers/traffic_gen/base.cc b/src/cpu/testers/traffic_gen/base.cc
index 3c28d00..7391814 100644
--- a/src/cpu/testers/traffic_gen/base.cc
+++ b/src/cpu/testers/traffic_gen/base.cc
@@ -347,15 +347,15 @@
       ADD_STAT(totalReads, UNIT_COUNT, "Total num of reads"),
       ADD_STAT(totalWrites, UNIT_COUNT, "Total num of writes"),
       ADD_STAT(avgReadLatency,
-               UNIT_RATE(Stats::Units::Tick, Stats::Units::Count),
+               UNIT_RATE(Stats::units::Tick, Stats::units::Count),
"Avg latency of read requests", totalReadLatency / totalReads),
       ADD_STAT(avgWriteLatency,
-               UNIT_RATE(Stats::Units::Tick, Stats::Units::Count),
+               UNIT_RATE(Stats::units::Tick, Stats::units::Count),
                "Avg latency of write requests",
                totalWriteLatency / totalWrites),
-      ADD_STAT(readBW, UNIT_RATE(Stats::Units::Byte, Stats::Units::Second),
+      ADD_STAT(readBW, UNIT_RATE(Stats::units::Byte, Stats::units::Second),
                "Read bandwidth", bytesRead / simSeconds),
- ADD_STAT(writeBW, UNIT_RATE(Stats::Units::Byte, Stats::Units::Second), + ADD_STAT(writeBW, UNIT_RATE(Stats::units::Byte, Stats::units::Second),
                "Write bandwidth", bytesWritten / simSeconds)
 {
 }
diff --git a/src/cpu/trace/trace_cpu.cc b/src/cpu/trace/trace_cpu.cc
index 6ceeae8..fc89108 100644
--- a/src/cpu/trace/trace_cpu.cc
+++ b/src/cpu/trace/trace_cpu.cc
@@ -209,7 +209,7 @@
     ADD_STAT(numOps, UNIT_COUNT,
              "Number of micro-ops simulated by the Trace CPU"),
     ADD_STAT(cpi,
-             UNIT_RATE(Stats::Units::Cycle, Stats::Units::Count),
+             UNIT_RATE(Stats::units::Cycle, Stats::units::Count),
              "Cycles per micro-op used as a proxy for CPI",
              trace->baseStats.numCycles / numOps)
 {
diff --git a/src/dev/arm/smmu_v3_caches.cc b/src/dev/arm/smmu_v3_caches.cc
index 069e070..488f3a6 100644
--- a/src/dev/arm/smmu_v3_caches.cc
+++ b/src/dev/arm/smmu_v3_caches.cc
@@ -86,15 +86,15 @@
     Stats::Group *parent, const std::string &name)
     : Stats::Group(parent, name.c_str()),
       ADD_STAT(averageLookups,
-               UNIT_RATE(Stats::Units::Count, Stats::Units::Second),
+               UNIT_RATE(Stats::units::Count, Stats::units::Second),
                "Average number lookups per second"),
       ADD_STAT(totalLookups, UNIT_COUNT, "Total number of lookups"),
       ADD_STAT(averageMisses,
-               UNIT_RATE(Stats::Units::Count, Stats::Units::Second),
+               UNIT_RATE(Stats::units::Count, Stats::units::Second),
                "Average number misses per second"),
       ADD_STAT(totalMisses, UNIT_COUNT, "Total number of misses"),
       ADD_STAT(averageUpdates,
-               UNIT_RATE(Stats::Units::Count, Stats::Units::Second),
+               UNIT_RATE(Stats::units::Count, Stats::units::Second),
                "Average number updates per second"),
       ADD_STAT(totalUpdates, UNIT_COUNT, "Total number of updates"),
       ADD_STAT(averageHitRate, UNIT_RATIO, "Average hit rate"),
@@ -1265,7 +1265,7 @@
             auto avg_lookup = new Stats::Formula(
                 this,
                 csprintf("averageLookups_S%dL%d", s+1, l).c_str(),
-                UNIT_RATE(Stats::Units::Count, Stats::Units::Second),
+                UNIT_RATE(Stats::units::Count, Stats::units::Second),
                 "Average number lookups per second");
             avg_lookup->flags(pdf);
             averageLookupsByStageLevel.push_back(avg_lookup);
@@ -1276,7 +1276,7 @@
             auto avg_misses = new Stats::Formula(
                 this,
                 csprintf("averageMisses_S%dL%d", s+1, l).c_str(),
-                UNIT_RATE(Stats::Units::Count, Stats::Units::Second),
+                UNIT_RATE(Stats::units::Count, Stats::units::Second),
                 "Average number misses per second");
             avg_misses->flags(pdf);
             averageMissesByStageLevel.push_back(avg_misses);
@@ -1287,7 +1287,7 @@
             auto avg_updates = new Stats::Formula(
                 this,
                 csprintf("averageUpdates_S%dL%d", s+1, l).c_str(),
-                UNIT_RATE(Stats::Units::Count, Stats::Units::Second),
+                UNIT_RATE(Stats::units::Count, Stats::units::Second),
                 "Average number updates per second");
             avg_updates->flags(pdf);
             averageUpdatesByStageLevel.push_back(avg_updates);
diff --git a/src/dev/arm/ufs_device.cc b/src/dev/arm/ufs_device.cc
index 830b841..6b05699 100644
--- a/src/dev/arm/ufs_device.cc
+++ b/src/dev/arm/ufs_device.cc
@@ -777,21 +777,21 @@
                "Number of transactions to device"),
       /** Average bandwidth for reads and writes */
       ADD_STAT(averageReadSSDBW,
-               UNIT_RATE(Stats::Units::Byte, Stats::Units::Second),
+               UNIT_RATE(Stats::units::Byte, Stats::units::Second),
                "Average read bandwidth",
                totalReadSSD / simSeconds),
       ADD_STAT(averageWriteSSDBW,
-               UNIT_RATE(Stats::Units::Byte, Stats::Units::Second),
+               UNIT_RATE(Stats::units::Byte, Stats::units::Second),
                "Average write bandwidth",
                totalWrittenSSD / simSeconds),
       ADD_STAT(averageSCSIQueue,
-               UNIT_RATE(Stats::Units::Count, Stats::Units::Tick),
+               UNIT_RATE(Stats::units::Count, Stats::units::Tick),
                "Average command queue length"),
       ADD_STAT(averageReadSSDQueue,
-               UNIT_RATE(Stats::Units::Count, Stats::Units::Tick),
+               UNIT_RATE(Stats::units::Count, Stats::units::Tick),
                "Average read queue length"),
       ADD_STAT(averageWriteSSDQueue,
-               UNIT_RATE(Stats::Units::Count, Stats::Units::Tick),
+               UNIT_RATE(Stats::units::Count, Stats::units::Tick),
                "Average write queue length"),
       /** Number of doorbells rung*/
       ADD_STAT(curDoorbell, UNIT_COUNT,
@@ -800,7 +800,7 @@
       ADD_STAT(maxDoorbell, UNIT_COUNT,
                "Maximum number of doorbells utilized"),
       ADD_STAT(averageDoorbell,
-               UNIT_RATE(Stats::Units::Count, Stats::Units::Tick),
+               UNIT_RATE(Stats::units::Count, Stats::units::Tick),
                "Average number of Doorbells used"),
       /** Latency*/
       ADD_STAT(transactionLatency, UNIT_TICK,
diff --git a/src/dev/net/etherdevice.cc b/src/dev/net/etherdevice.cc
index 9def479..b7c541a 100644
--- a/src/dev/net/etherdevice.cc
+++ b/src/dev/net/etherdevice.cc
@@ -37,10 +37,10 @@
       ADD_STAT(rxBytes, UNIT_BYTE, "Bytes Received"),
       ADD_STAT(txPackets, UNIT_COUNT, "Number of Packets Transmitted"),
       ADD_STAT(rxPackets, UNIT_COUNT, "Number of Packets Received"),
- ADD_STAT(txBandwidth, UNIT_RATE(Stats::Units::Bit, Stats::Units::Second), + ADD_STAT(txBandwidth, UNIT_RATE(Stats::units::Bit, Stats::units::Second),
                "Transmit Bandwidth",
                txBytes * Stats::constant(8) / simSeconds),
- ADD_STAT(rxBandwidth, UNIT_RATE(Stats::Units::Bit, Stats::Units::Second), + ADD_STAT(rxBandwidth, UNIT_RATE(Stats::units::Bit, Stats::units::Second),
                "Receive Bandwidth",
                rxBytes * Stats::constant(8) / simSeconds),
       ADD_STAT(txIpChecksums, UNIT_COUNT,
@@ -64,28 +64,28 @@
       ADD_STAT(descDmaWrBytes, UNIT_COUNT,
                "Number of descriptor bytes write w/ DMA"),
       ADD_STAT(totBandwidth,
-               UNIT_RATE(Stats::Units::Bit, Stats::Units::Second),
+               UNIT_RATE(Stats::units::Bit, Stats::units::Second),
                "Total Bandwidth",
                txBandwidth + rxBandwidth),
ADD_STAT(totPackets, UNIT_COUNT, "Total Packets", txPackets + rxPackets),
       ADD_STAT(totBytes, UNIT_BYTE, "Total Bytes", txBytes + rxBytes),
       ADD_STAT(totPacketRate,
-               UNIT_RATE(Stats::Units::Count, Stats::Units::Second),
+               UNIT_RATE(Stats::units::Count, Stats::units::Second),
                "Total Packet Tranmission Rate",
                totPackets / simSeconds),
       ADD_STAT(txPacketRate,
-               UNIT_RATE(Stats::Units::Count, Stats::Units::Second),
+               UNIT_RATE(Stats::units::Count, Stats::units::Second),
                "Packet Tranmission Rate",
                txPackets / simSeconds),
       ADD_STAT(rxPacketRate,
-               UNIT_RATE(Stats::Units::Count, Stats::Units::Second),
+               UNIT_RATE(Stats::units::Count, Stats::units::Second),
                "Packet Reception Rate",
                rxPackets / simSeconds),
       ADD_STAT(postedSwi, UNIT_COUNT,
                "Number of software interrupts posted to CPU"),
       ADD_STAT(totalSwi, UNIT_COUNT, "Total number of Swi written to ISR"),
       ADD_STAT(coalescedSwi,
-               UNIT_RATE(Stats::Units::Count, Stats::Units::Count),
+               UNIT_RATE(Stats::units::Count, Stats::units::Count),
                "Average number of Swi's coalesced into each post",
                totalSwi / postedInterrupts),
       ADD_STAT(postedRxIdle, UNIT_COUNT,
@@ -93,14 +93,14 @@
       ADD_STAT(totalRxIdle, UNIT_COUNT,
                "Total number of RxIdle written to ISR"),
       ADD_STAT(coalescedRxIdle,
-               UNIT_RATE(Stats::Units::Count, Stats::Units::Count),
+               UNIT_RATE(Stats::units::Count, Stats::units::Count),
                "Average number of RxIdle's coalesced into each post",
                totalRxIdle / postedInterrupts),
       ADD_STAT(postedRxOk, UNIT_COUNT,
                "Number of RxOk interrupts posted to CPU"),
ADD_STAT(totalRxOk, UNIT_COUNT, "Total number of RxOk written to ISR"),
       ADD_STAT(coalescedRxOk,
-               UNIT_RATE(Stats::Units::Count, Stats::Units::Count),
+               UNIT_RATE(Stats::units::Count, Stats::units::Count),
                "Average number of RxOk's coalesced into each post",
                totalRxOk / postedInterrupts),
       ADD_STAT(postedRxDesc, UNIT_COUNT,
@@ -108,7 +108,7 @@
       ADD_STAT(totalRxDesc, UNIT_COUNT,
                "Total number of RxDesc written to ISR"),
       ADD_STAT(coalescedRxDesc,
-               UNIT_RATE(Stats::Units::Count, Stats::Units::Count),
+               UNIT_RATE(Stats::units::Count, Stats::units::Count),
                "Average number of RxDesc's coalesced into each post",
                totalRxDesc / postedInterrupts),
       ADD_STAT(postedTxOk, UNIT_COUNT,
@@ -116,7 +116,7 @@
       ADD_STAT(totalTxOk, UNIT_COUNT,
                "Total number of TxOk written to ISR"),
       ADD_STAT(coalescedTxOk,
-               UNIT_RATE(Stats::Units::Count, Stats::Units::Count),
+               UNIT_RATE(Stats::units::Count, Stats::units::Count),
                "Average number of TxOk's coalesced into each post",
                totalTxOk / postedInterrupts),
       ADD_STAT(postedTxIdle, UNIT_COUNT,
@@ -124,7 +124,7 @@
       ADD_STAT(totalTxIdle, UNIT_COUNT,
                "Total number of TxIdle written to ISR"),
       ADD_STAT(coalescedTxIdle,
-               UNIT_RATE(Stats::Units::Count, Stats::Units::Count),
+               UNIT_RATE(Stats::units::Count, Stats::units::Count),
                "Average number of TxIdle's coalesced into each post",
                totalTxIdle / postedInterrupts),
       ADD_STAT(postedTxDesc, UNIT_COUNT,
@@ -132,7 +132,7 @@
       ADD_STAT(totalTxDesc, UNIT_COUNT,
                "Total number of TxDesc written to ISR"),
       ADD_STAT(coalescedTxDesc,
-               UNIT_RATE(Stats::Units::Count, Stats::Units::Count),
+               UNIT_RATE(Stats::units::Count, Stats::units::Count),
                "Average number of TxDesc's coalesced into each post",
                totalTxDesc / postedInterrupts),
       ADD_STAT(postedRxOrn, UNIT_COUNT,
@@ -140,11 +140,11 @@
       ADD_STAT(totalRxOrn, UNIT_COUNT,
                "Total number of RxOrn written to ISR"),
       ADD_STAT(coalescedRxOrn,
-               UNIT_RATE(Stats::Units::Count, Stats::Units::Count),
+               UNIT_RATE(Stats::units::Count, Stats::units::Count),
                "Average number of RxOrn's coalesced into each post",
                totalRxOrn / postedInterrupts),
       ADD_STAT(coalescedTotal,
-               UNIT_RATE(Stats::Units::Count, Stats::Units::Count),
+               UNIT_RATE(Stats::units::Count, Stats::units::Count),
                "Average number of interrupts coalesced into each post"),
       ADD_STAT(droppedPackets, UNIT_COUNT, "Number of packets dropped")
 {
diff --git a/src/dev/net/sinic.cc b/src/dev/net/sinic.cc
index cc088ab..e6ebfd3 100644
--- a/src/dev/net/sinic.cc
+++ b/src/dev/net/sinic.cc
@@ -104,7 +104,7 @@
                "Number of vnic distance measurements"),
       ADD_STAT(maxVnicDistance, UNIT_COUNT, "Maximum vnic distance"),
       ADD_STAT(avgVnicDistance,
-               UNIT_RATE(Stats::Units::Count, Stats::Units::Count),
+               UNIT_RATE(Stats::units::Count, Stats::units::Count),
"Average vnic distance", totalVnicDistance / numVnicDistance),
       _maxVnicDistance(0)
 {
diff --git a/src/mem/abstract_mem.cc b/src/mem/abstract_mem.cc
index 999ad0f..37fdc82 100644
--- a/src/mem/abstract_mem.cc
+++ b/src/mem/abstract_mem.cc
@@ -122,13 +122,13 @@
              "Number of write requests responded to by this memory"),
     ADD_STAT(numOther, UNIT_COUNT,
              "Number of other requests responded to by this memory"),
-    ADD_STAT(bwRead, UNIT_RATE(Stats::Units::Byte, Stats::Units::Second),
+    ADD_STAT(bwRead, UNIT_RATE(Stats::units::Byte, Stats::units::Second),
              "Total read bandwidth from this memory"),
- ADD_STAT(bwInstRead, UNIT_RATE(Stats::Units::Byte, Stats::Units::Second), + ADD_STAT(bwInstRead, UNIT_RATE(Stats::units::Byte, Stats::units::Second),
              "Instruction read bandwidth from this memory"),
-    ADD_STAT(bwWrite, UNIT_RATE(Stats::Units::Byte, Stats::Units::Second),
+    ADD_STAT(bwWrite, UNIT_RATE(Stats::units::Byte, Stats::units::Second),
              "Write bandwidth from this memory"),
-    ADD_STAT(bwTotal, UNIT_RATE(Stats::Units::Byte, Stats::Units::Second),
+    ADD_STAT(bwTotal, UNIT_RATE(Stats::units::Byte, Stats::units::Second),
              "Total bandwidth to/from this memory")
 {
 }
diff --git a/src/mem/cache/base.cc b/src/mem/cache/base.cc
index 375fd30..e028e0d 100644
--- a/src/mem/cache/base.cc
+++ b/src/mem/cache/base.cc
@@ -1937,7 +1937,7 @@
       ADD_STAT(missRate, UNIT_RATIO,
                ("miss rate for " + name + " accesses").c_str()),
       ADD_STAT(avgMissLatency,
-               UNIT_RATE(Stats::Units::Tick, Stats::Units::Count),
+               UNIT_RATE(Stats::units::Tick, Stats::units::Count),
                ("average " + name + " miss latency").c_str()),
       ADD_STAT(mshrHits, UNIT_COUNT,
                ("number of " + name + " MSHR hits").c_str()),
@@ -1952,10 +1952,10 @@
       ADD_STAT(mshrMissRate, UNIT_RATIO,
                ("mshr miss rate for " + name + " accesses").c_str()),
       ADD_STAT(avgMshrMissLatency,
-               UNIT_RATE(Stats::Units::Tick, Stats::Units::Count),
+               UNIT_RATE(Stats::units::Tick, Stats::units::Count),
                ("average " + name + " mshr miss latency").c_str()),
       ADD_STAT(avgMshrUncacheableLatency,
-               UNIT_RATE(Stats::Units::Tick, Stats::Units::Count),
+               UNIT_RATE(Stats::units::Tick, Stats::units::Count),
                ("average " + name + " mshr uncacheable latency").c_str())
 {
 }
@@ -2102,14 +2102,14 @@
     ADD_STAT(demandMissRate, UNIT_RATIO, "miss rate for demand accesses"),
ADD_STAT(overallMissRate, UNIT_RATIO, "miss rate for overall accesses"),
     ADD_STAT(demandAvgMissLatency,
-             UNIT_RATE(Stats::Units::Cycle, Stats::Units::Count),
+             UNIT_RATE(Stats::units::Cycle, Stats::units::Count),
              "average overall miss latency"),
     ADD_STAT(overallAvgMissLatency,
-             UNIT_RATE(Stats::Units::Cycle, Stats::Units::Count),
+             UNIT_RATE(Stats::units::Cycle, Stats::units::Count),
              "average overall miss latency"),
ADD_STAT(blockedCycles, UNIT_CYCLE, "number of cycles access was blocked"), ADD_STAT(blockedCauses, UNIT_COUNT, "number of times access was blocked"), - ADD_STAT(avgBlocked, UNIT_RATE(Stats::Units::Cycle, Stats::Units::Count), + ADD_STAT(avgBlocked, UNIT_RATE(Stats::units::Cycle, Stats::units::Count),
              "average number of cycles each access was blocked"),
     ADD_STAT(unusedPrefetches, UNIT_COUNT,
              "number of HardPF blocks evicted w/o reference"),
@@ -2133,13 +2133,13 @@
     ADD_STAT(overallMshrMissRate, UNIT_RATIO,
              "mshr miss ratio for overall accesses"),
     ADD_STAT(demandAvgMshrMissLatency,
-             UNIT_RATE(Stats::Units::Cycle, Stats::Units::Count),
+             UNIT_RATE(Stats::units::Cycle, Stats::units::Count),
              "average overall mshr miss latency"),
     ADD_STAT(overallAvgMshrMissLatency,
-             UNIT_RATE(Stats::Units::Cycle, Stats::Units::Count),
+             UNIT_RATE(Stats::units::Cycle, Stats::units::Count),
              "average overall mshr miss latency"),
     ADD_STAT(overallAvgMshrUncacheableLatency,
-             UNIT_RATE(Stats::Units::Cycle, Stats::Units::Count),
+             UNIT_RATE(Stats::units::Cycle, Stats::units::Count),
              "average overall mshr uncacheable latency"),
     ADD_STAT(replacements, UNIT_COUNT, "number of replacements"),
     ADD_STAT(dataExpansions, UNIT_COUNT,"number of data expansions"),
diff --git a/src/mem/cache/compressors/base.cc b/src/mem/cache/compressors/base.cc
index 5964f43..14fd9c5 100644
--- a/src/mem/cache/compressors/base.cc
+++ b/src/mem/cache/compressors/base.cc
@@ -236,7 +236,7 @@
              "size"),
     ADD_STAT(compressionSizeBits, UNIT_BIT, "Total compressed data size"),
     ADD_STAT(avgCompressionSizeBits,
-             UNIT_RATE(Stats::Units::Bit, Stats::Units::Count),
+             UNIT_RATE(Stats::units::Bit, Stats::units::Count),
              "Average compression size"),
     ADD_STAT(decompressions, UNIT_COUNT, "Total number of decompressions")
 {
diff --git a/src/mem/cache/tags/base.cc b/src/mem/cache/tags/base.cc
index b378123..977a99f 100644
--- a/src/mem/cache/tags/base.cc
+++ b/src/mem/cache/tags/base.cc
@@ -216,19 +216,19 @@
     : Stats::Group(&_tags),
     tags(_tags),

-    ADD_STAT(tagsInUse, UNIT_RATE(Stats::Units::Tick, Stats::Units::Count),
+    ADD_STAT(tagsInUse, UNIT_RATE(Stats::units::Tick, Stats::units::Count),
              "Average ticks per tags in use"),
     ADD_STAT(totalRefs, UNIT_COUNT,
              "Total number of references to valid blocks."),
     ADD_STAT(sampledRefs, UNIT_COUNT,
              "Sample count of references to valid blocks."),
-    ADD_STAT(avgRefs, UNIT_RATE(Stats::Units::Count, Stats::Units::Count),
+    ADD_STAT(avgRefs, UNIT_RATE(Stats::units::Count, Stats::units::Count),
              "Average number of references to valid blocks."),
     ADD_STAT(warmupTick, UNIT_TICK,
              "The tick when the warmup percentage was hit."),
- ADD_STAT(occupancies, UNIT_RATE(Stats::Units::Count, Stats::Units::Tick), + ADD_STAT(occupancies, UNIT_RATE(Stats::units::Count, Stats::units::Tick),
              "Average occupied blocks per tick, per requestor"),
-    ADD_STAT(avgOccs, UNIT_RATE(Stats::Units::Ratio, Stats::Units::Tick),
+    ADD_STAT(avgOccs, UNIT_RATE(Stats::units::Ratio, Stats::units::Tick),
              "Average percentage of cache occupancy"),
     ADD_STAT(occupanciesTaskId, UNIT_COUNT, "Occupied blocks per task id"),
     ADD_STAT(ageTaskId, UNIT_COUNT,
diff --git a/src/mem/comm_monitor.cc b/src/mem/comm_monitor.cc
index 26a7d4b..b77bc86 100644
--- a/src/mem/comm_monitor.cc
+++ b/src/mem/comm_monitor.cc
@@ -109,23 +109,23 @@
       disableBandwidthHists(params.disable_bandwidth_hists),
       readBytes(0),
       ADD_STAT(readBandwidthHist,
-               UNIT_RATE(Stats::Units::Byte, Stats::Units::Second),
+               UNIT_RATE(Stats::units::Byte, Stats::units::Second),
                "Histogram of read bandwidth per sample period"),
       ADD_STAT(totalReadBytes, UNIT_BYTE, "Number of bytes read"),
       ADD_STAT(averageReadBandwidth,
-               UNIT_RATE(Stats::Units::Byte, Stats::Units::Second),
+               UNIT_RATE(Stats::units::Byte, Stats::units::Second),
                "Average read bandwidth",
                totalReadBytes / simSeconds),

       writtenBytes(0),
       ADD_STAT(writeBandwidthHist,
-               UNIT_RATE(Stats::Units::Byte, Stats::Units::Second),
+               UNIT_RATE(Stats::units::Byte, Stats::units::Second),
                "Histogram of write bandwidth"),
       ADD_STAT(totalWrittenBytes,
-               UNIT_RATE(Stats::Units::Byte, Stats::Units::Second),
+               UNIT_RATE(Stats::units::Byte, Stats::units::Second),
                "Number of bytes written"),
       ADD_STAT(averageWriteBandwidth,
-               UNIT_RATE(Stats::Units::Byte, Stats::Units::Second),
+               UNIT_RATE(Stats::units::Byte, Stats::units::Second),
                "Average write bandwidth",
                totalWrittenBytes / simSeconds),

diff --git a/src/mem/mem_ctrl.cc b/src/mem/mem_ctrl.cc
index 16895bb..2857258 100644
--- a/src/mem/mem_ctrl.cc
+++ b/src/mem/mem_ctrl.cc
@@ -1203,10 +1203,10 @@
              "Number of requests that are neither read nor write"),

     ADD_STAT(avgRdQLen,
-             UNIT_RATE(Stats::Units::Count, Stats::Units::Tick),
+             UNIT_RATE(Stats::units::Count, Stats::units::Tick),
              "Average read queue length when enqueuing"),
     ADD_STAT(avgWrQLen,
-             UNIT_RATE(Stats::Units::Count, Stats::Units::Tick),
+             UNIT_RATE(Stats::units::Count, Stats::units::Tick),
              "Average write queue length when enqueuing"),

     ADD_STAT(numRdRetry, UNIT_COUNT,
@@ -1234,13 +1234,13 @@
     ADD_STAT(bytesWrittenSys, UNIT_BYTE,
              "Total written bytes from the system interface side"),

- ADD_STAT(avgRdBWSys, UNIT_RATE(Stats::Units::Byte, Stats::Units::Second), + ADD_STAT(avgRdBWSys, UNIT_RATE(Stats::units::Byte, Stats::units::Second),
              "Average system read bandwidth in Byte/s"),
- ADD_STAT(avgWrBWSys, UNIT_RATE(Stats::Units::Byte, Stats::Units::Second), + ADD_STAT(avgWrBWSys, UNIT_RATE(Stats::units::Byte, Stats::units::Second),
              "Average system write bandwidth in Byte/s"),

     ADD_STAT(totGap, UNIT_TICK, "Total gap between requests"),
-    ADD_STAT(avgGap, UNIT_RATE(Stats::Units::Tick, Stats::Units::Count),
+    ADD_STAT(avgGap, UNIT_RATE(Stats::units::Tick, Stats::units::Count),
              "Average gap between requests"),

     ADD_STAT(requestorReadBytes, UNIT_BYTE,
@@ -1248,10 +1248,10 @@
     ADD_STAT(requestorWriteBytes, UNIT_BYTE,
              "Per-requestor bytes write to memory"),
     ADD_STAT(requestorReadRate,
-             UNIT_RATE(Stats::Units::Byte, Stats::Units::Second),
+             UNIT_RATE(Stats::units::Byte, Stats::units::Second),
              "Per-requestor bytes read from memory rate"),
     ADD_STAT(requestorWriteRate,
-             UNIT_RATE(Stats::Units::Byte, Stats::Units::Second),
+             UNIT_RATE(Stats::units::Byte, Stats::units::Second),
              "Per-requestor bytes write to memory rate"),
     ADD_STAT(requestorReadAccesses, UNIT_COUNT,
              "Per-requestor read serviced memory accesses"),
@@ -1262,10 +1262,10 @@
     ADD_STAT(requestorWriteTotalLat, UNIT_TICK,
              "Per-requestor write total memory access latency"),
     ADD_STAT(requestorReadAvgLat,
-             UNIT_RATE(Stats::Units::Tick, Stats::Units::Count),
+             UNIT_RATE(Stats::units::Tick, Stats::units::Count),
              "Per-requestor read average memory access latency"),
     ADD_STAT(requestorWriteAvgLat,
-             UNIT_RATE(Stats::Units::Tick, Stats::Units::Count),
+             UNIT_RATE(Stats::units::Tick, Stats::units::Count),
              "Per-requestor write average memory access latency")

 {
diff --git a/src/mem/mem_interface.cc b/src/mem/mem_interface.cc
index ff9863c..56cc8f7 100644
--- a/src/mem/mem_interface.cc
+++ b/src/mem/mem_interface.cc
@@ -1861,11 +1861,11 @@
              "Total ticks spent from burst creation until serviced "
              "by the DRAM"),

-    ADD_STAT(avgQLat, UNIT_RATE(Stats::Units::Tick, Stats::Units::Count),
+    ADD_STAT(avgQLat, UNIT_RATE(Stats::units::Tick, Stats::units::Count),
              "Average queueing delay per DRAM burst"),
-    ADD_STAT(avgBusLat, UNIT_RATE(Stats::Units::Tick, Stats::Units::Count),
+    ADD_STAT(avgBusLat, UNIT_RATE(Stats::units::Tick, Stats::units::Count),
              "Average bus latency per DRAM burst"),
- ADD_STAT(avgMemAccLat, UNIT_RATE(Stats::Units::Tick, Stats::Units::Count), + ADD_STAT(avgMemAccLat, UNIT_RATE(Stats::units::Tick, Stats::units::Count),
              "Average memory access latency per DRAM burst"),

     ADD_STAT(readRowHits, UNIT_COUNT,
@@ -1878,11 +1878,11 @@
ADD_STAT(bytesPerActivate, UNIT_BYTE, "Bytes accessed per row activation"),
     ADD_STAT(bytesRead, UNIT_BYTE, "Total number of bytes read from DRAM"),
ADD_STAT(bytesWritten, UNIT_BYTE, "Total number of bytes written to DRAM"),
-    ADD_STAT(avgRdBW, UNIT_RATE(Stats::Units::Byte, Stats::Units::Second),
+    ADD_STAT(avgRdBW, UNIT_RATE(Stats::units::Byte, Stats::units::Second),
              "Average DRAM read bandwidth in MiBytes/s"),
-    ADD_STAT(avgWrBW, UNIT_RATE(Stats::Units::Byte, Stats::Units::Second),
+    ADD_STAT(avgWrBW, UNIT_RATE(Stats::units::Byte, Stats::units::Second),
              "Average DRAM write bandwidth in MiBytes/s"),
-    ADD_STAT(peakBW,  UNIT_RATE(Stats::Units::Byte, Stats::Units::Second),
+    ADD_STAT(peakBW,  UNIT_RATE(Stats::units::Byte, Stats::units::Second),
              "Theoretical peak bandwidth in MiByte/s"),

     ADD_STAT(busUtil, UNIT_RATIO, "Data bus utilization in percentage"),
@@ -2506,20 +2506,20 @@
     ADD_STAT(totMemAccLat, UNIT_TICK,
              "Total ticks spent from burst creation until serviced "
              "by the NVM"),
-    ADD_STAT(avgQLat, UNIT_RATE(Stats::Units::Tick, Stats::Units::Count),
+    ADD_STAT(avgQLat, UNIT_RATE(Stats::units::Tick, Stats::units::Count),
              "Average queueing delay per NVM burst"),
-    ADD_STAT(avgBusLat, UNIT_RATE(Stats::Units::Tick, Stats::Units::Count),
+    ADD_STAT(avgBusLat, UNIT_RATE(Stats::units::Tick, Stats::units::Count),
              "Average bus latency per NVM burst"),
- ADD_STAT(avgMemAccLat, UNIT_RATE(Stats::Units::Tick, Stats::Units::Count), + ADD_STAT(avgMemAccLat, UNIT_RATE(Stats::units::Tick, Stats::units::Count),
              "Average memory access latency per NVM burst"),

     ADD_STAT(bytesRead, UNIT_BYTE, "Total number of bytes read from DRAM"),
ADD_STAT(bytesWritten, UNIT_BYTE, "Total number of bytes written to DRAM"),
-    ADD_STAT(avgRdBW, UNIT_RATE(Stats::Units::Byte, Stats::Units::Second),
+    ADD_STAT(avgRdBW, UNIT_RATE(Stats::units::Byte, Stats::units::Second),
              "Average DRAM read bandwidth in MiBytes/s"),
-    ADD_STAT(avgWrBW, UNIT_RATE(Stats::Units::Byte, Stats::Units::Second),
+    ADD_STAT(avgWrBW, UNIT_RATE(Stats::units::Byte, Stats::units::Second),
              "Average DRAM write bandwidth in MiBytes/s"),
-    ADD_STAT(peakBW, UNIT_RATE(Stats::Units::Byte, Stats::Units::Second),
+    ADD_STAT(peakBW, UNIT_RATE(Stats::units::Byte, Stats::units::Second),
              "Theoretical peak bandwidth in MiByte/s"),
ADD_STAT(busUtil, UNIT_RATIO, "NVM Data bus utilization in percentage"),
     ADD_STAT(busUtilRead, UNIT_RATIO,
diff --git a/src/sim/root.cc b/src/sim/root.cc
index fb49de1..bf0e659 100644
--- a/src/sim/root.cc
+++ b/src/sim/root.cc
@@ -59,11 +59,11 @@
     ADD_STAT(finalTick, UNIT_TICK,
              "Number of ticks from beginning of simulation "
              "(restored from checkpoints and never reset)"),
-    ADD_STAT(simFreq, UNIT_RATE(Stats::Units::Tick, Stats::Units::Second),
+    ADD_STAT(simFreq, UNIT_RATE(Stats::units::Tick, Stats::units::Second),
              "The number of ticks per simulated second"),
     ADD_STAT(hostSeconds, UNIT_SECOND, "Real time elapsed on the host"),
     ADD_STAT(hostTickRate,
-             UNIT_RATE(Stats::Units::Tick, Stats::Units::Second),
+             UNIT_RATE(Stats::units::Tick, Stats::units::Second),
              "The number of ticks simulated per host second (ticks/s)"),
     ADD_STAT(hostMemory, UNIT_BYTE, "Number of bytes of host memory used"),


--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/45415
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: I9ce855b291db122d952098a090a2984b42152850
Gerrit-Change-Number: 45415
Gerrit-PatchSet: 1
Gerrit-Owner: Daniel Carvalho <[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