summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNathan Binkert <nate@binkert.org>2009-04-22 06:44:29 -0700
committerNathan Binkert <nate@binkert.org>2009-04-22 06:44:29 -0700
commit61a68371be61f4800f986f9e352846bcb8a6e475 (patch)
treef0ef6dbed299508a351abc5e6e47906fe451e97c /src
parente7fa4f2f8e256d537f330e6b84d8b3438e3d7395 (diff)
downloadgem5-61a68371be61f4800f986f9e352846bcb8a6e475.tar.xz
stats: fix initialization bug in distribution text output
Diffstat (limited to 'src')
-rw-r--r--src/base/stats/text.cc24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/base/stats/text.cc b/src/base/stats/text.cc
index c3e484cf4..a175a1ab3 100644
--- a/src/base/stats/text.cc
+++ b/src/base/stats/text.cc
@@ -359,22 +359,22 @@ struct DistPrint
const DistData &data;
- DistPrint(const DistInfoBase &info);
- DistPrint(const VectorDistInfoBase &info, int i);
- void init(const Info &info, const DistParams *params);
+ DistPrint(const Text *text, const DistInfoBase &info);
+ DistPrint(const Text *text, const VectorDistInfoBase &info, int i);
+ void init(const Text *text, const Info &info, const DistParams *params);
void operator()(ostream &stream) const;
};
-DistPrint::DistPrint(const DistInfoBase &info)
+DistPrint::DistPrint(const Text *text, const DistInfoBase &info)
: data(info.data)
{
- init(info, safe_cast<const DistParams *>(info.storageParams));
+ init(text, info, safe_cast<const DistParams *>(info.storageParams));
}
-DistPrint::DistPrint(const VectorDistInfoBase &info, int i)
+DistPrint::DistPrint(const Text *text, const VectorDistInfoBase &info, int i)
: data(info.data[i])
{
- init(info, safe_cast<const DistParams *>(info.storageParams));
+ init(text, info, safe_cast<const DistParams *>(info.storageParams));
name = info.name + "_" +
(info.subnames[i].empty() ? (to_string(i)) : info.subnames[i]);
@@ -384,14 +384,14 @@ DistPrint::DistPrint(const VectorDistInfoBase &info, int i)
}
void
-DistPrint::init(const Info &info, const DistParams *params)
+DistPrint::init(const Text *text, const Info &info, const DistParams *params)
{
name = info.name;
desc = info.desc;
flags = info.flags;
- compat = compat;
- descriptions = descriptions;
precision = info.precision;
+ compat = text->compat;
+ descriptions = text->descriptions;
fancy = params->fancy;
min = params->min;
@@ -685,7 +685,7 @@ Text::visit(const DistInfoBase &info)
if (noOutput(info))
return;
- DistPrint print(info);
+ DistPrint print(this, info);
print(*stream);
}
@@ -696,7 +696,7 @@ Text::visit(const VectorDistInfoBase &info)
return;
for (off_type i = 0; i < info.size(); ++i) {
- DistPrint print(info, i);
+ DistPrint print(this, info, i);
print(*stream);
}
}