Daniel Carvalho has submitted this change. (
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]>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/45414
Maintainer: Jason Lowe-Power <[email protected]>
Tested-by: kokoro <[email protected]>
Reviewed-by: Hoa Nguyen <[email protected]>
---
M src/base/stats/text.cc
M src/base/stats/text.hh
2 files changed, 15 insertions(+), 15 deletions(-)
Approvals:
Hoa Nguyen: Looks good to me, approved
Jason Lowe-Power: Looks good to me, approved
kokoro: Regressions pass
diff --git a/src/base/stats/text.cc b/src/base/stats/text.cc
index 8c0ff5f..b8b49ac 100644
--- a/src/base/stats/text.cc
+++ b/src/base/stats/text.cc
@@ -201,7 +201,7 @@
int precision;
bool descriptions;
std::string desc;
- bool units;
+ bool enableUnits;
std::string unitStr;
bool spaces;
@@ -218,7 +218,7 @@
precision = _precision;
descriptions = enable_descriptions;
desc = _desc;
- units = enable_units;
+ enableUnits = enable_units;
unitStr = unit_str;
spaces = enable_spaces;
}
@@ -226,7 +226,7 @@
void
printUnits(std::ostream &stream) const
{
- if (units && !unitStr.empty()) {
+ if (enableUnits && !unitStr.empty()) {
ccprintf(stream, " (%s)", unitStr);
}
}
@@ -344,8 +344,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;
@@ -439,8 +439,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;
@@ -586,7 +586,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;
@@ -603,7 +603,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();
@@ -649,7 +649,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;
@@ -754,7 +754,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;
}
@@ -766,8 +766,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;
@@ -804,7 +804,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;
5 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the
submitted one.
--
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: 8
Gerrit-Owner: Daniel Carvalho <[email protected]>
Gerrit-Reviewer: Daniel Carvalho <[email protected]>
Gerrit-Reviewer: Hoa Nguyen <[email protected]>
Gerrit-Reviewer: Jason Lowe-Power <[email protected]>
Gerrit-Reviewer: kokoro <[email protected]>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s