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

Change subject: base-stats: Rename units variable as enableUnits
......................................................................

base-stats: Rename units variable as enableUnits

Pave the way for a units namespace.

Change-Id: Idd8516f0297be7ba4a76b69315c4a4935e57d937
Signed-off-by: Daniel R. Carvalho <[email protected]>
---
M src/base/stats/text.cc
M src/base/stats/text.hh
2 files changed, 15 insertions(+), 15 deletions(-)



diff --git a/src/base/stats/text.cc b/src/base/stats/text.cc
index 5718a36..94f21cd 100644
--- a/src/base/stats/text.cc
+++ b/src/base/stats/text.cc
@@ -226,7 +226,7 @@
     int precision;
     bool descriptions;
     std::string desc;
-    bool units;
+    bool enableUnits;
     std::string unitStr;
     bool spaces;

@@ -243,7 +243,7 @@
         precision = _precision;
         descriptions = enable_descriptions;
         desc = _desc;
-        units = enable_units;
+        enableUnits = enable_units;
         unitStr = unit_str;
         spaces = enable_spaces;
     }
@@ -251,7 +251,7 @@
     void
     printUnits(std::ostream &stream) const
     {
-        if (units && !unitStr.empty()) {
+        if (enableUnits && !unitStr.empty()) {
             ccprintf(stream, " (%s)", unitStr);
         }
     }
@@ -369,8 +369,8 @@
     std::string base = name + separatorString;

     ScalarPrint print(spaces);
-    print.setup(name, flags, precision, descriptions, desc, units, unitStr,
-        spaces);
+    print.setup(name, flags, precision, descriptions, desc, enableUnits,
+        unitStr, spaces);
     print.pdf = _total ? 0.0 : NAN;
     print.cdf = _total ? 0.0 : NAN;

@@ -464,8 +464,8 @@
 DistPrint::init(const Text *text, const Info &info)
 {
     setup(text->statName(info.name), info.flags, info.precision,
- text->descriptions, info.desc, text->units, info.unit->getUnitString(),
-        text->spaces);
+        text->descriptions, info.desc, text->enableUnits,
+        info.unit->getUnitString(), text->spaces);
     separatorString = info.separatorString;
     if (spaces) {
         nameSpaces = 40;
@@ -611,7 +611,7 @@

     ScalarPrint print(spaces);
print.setup(statName(info.name), info.flags, info.precision, descriptions,
-        info.desc, units, info.unit->getUnitString(), spaces);
+        info.desc, enableUnits, info.unit->getUnitString(), spaces);
     print.value = info.result();
     print.pdf = NAN;
     print.cdf = NAN;
@@ -628,7 +628,7 @@
     size_type size = info.size();
     VectorPrint print(spaces);
print.setup(statName(info.name), info.flags, info.precision, descriptions,
-        info.desc, units, info.unit->getUnitString(), spaces);
+        info.desc, enableUnits, info.unit->getUnitString(), spaces);
     print.separatorString = info.separatorString;
     print.vec = info.result();
     print.total = info.total();
@@ -674,7 +674,7 @@
     print.flags = info.flags;
     print.separatorString = info.separatorString;
     print.descriptions = descriptions;
-    print.units = units;
+    print.enableUnits = enableUnits;
     print.precision = info.precision;
     print.forceSubnames = true;

@@ -779,7 +779,7 @@
 SparseHistPrint::init(const Text *text, const Info &info)
 {
     setup(text->statName(info.name), info.flags, info.precision,
-        text->descriptions, info.desc, text->units,
+        text->descriptions, info.desc, text->enableUnits,
         info.unit->getUnitString(), text->spaces);
     separatorString = info.separatorString;
 }
@@ -791,8 +791,8 @@
     std::string base = name + separatorString;

     ScalarPrint print(spaces);
- print.setup(base + "samples", flags, precision, descriptions, desc, units,
-        unitStr, spaces);
+    print.setup(base + "samples", flags, precision, descriptions, desc,
+        enableUnits, unitStr, spaces);
     print.pdf = NAN;
     print.cdf = NAN;
     print.value = data.samples;
@@ -829,7 +829,7 @@
     if (!connected) {
         text.open(*simout.findOrCreate(filename)->stream());
         text.descriptions = desc;
-        text.units = desc; // the units are printed if descs are
+        text.enableUnits = desc; // the units are printed if descs are
         text.spaces = spaces;
         connected = true;
     }
diff --git a/src/base/stats/text.hh b/src/base/stats/text.hh
index d5ee7f7..5121a4f 100644
--- a/src/base/stats/text.hh
+++ b/src/base/stats/text.hh
@@ -64,7 +64,7 @@
     bool noOutput(const Info &info);

   public:
-    bool units;
+    bool enableUnits;
     bool descriptions;
     bool spaces;


--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/45414
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: Idd8516f0297be7ba4a76b69315c4a4935e57d937
Gerrit-Change-Number: 45414
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