diff options
author | Dam Sunwoo <dam.sunwoo@arm.com> | 2012-01-09 18:08:20 -0600 |
---|---|---|
committer | Dam Sunwoo <dam.sunwoo@arm.com> | 2012-01-09 18:08:20 -0600 |
commit | bda1125e882eaf8c127ebdae0d847bf2148832ad (patch) | |
tree | 901e369283d6b8e3a8eeb937ebf417707177bfe0 /src/base | |
parent | 51aa7e4a0392d5e8f98bd7a4d09f4026dd21bd0a (diff) | |
download | gem5-bda1125e882eaf8c127ebdae0d847bf2148832ad.tar.xz |
stats: fix Vector2d to display stats correctly when y_subname is not specified.
Vector2d stats with no y_subname were not displayed as the VectorPrint subname was not initialized correctly to reflect the empty field.
Diffstat (limited to 'src/base')
-rw-r--r-- | src/base/stats/text.cc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/base/stats/text.cc b/src/base/stats/text.cc index 4cf98ca9e..8fb49dc59 100644 --- a/src/base/stats/text.cc +++ b/src/base/stats/text.cc @@ -513,7 +513,14 @@ Text::visit(const Vector2dInfo &info) bool havesub = false; VectorPrint print; - print.subnames = info.y_subnames; + if (!info.y_subnames.empty()) { + for (off_type i = 0; i < info.y; ++i) { + if (!info.y_subnames[i].empty()) { + print.subnames = info.y_subnames; + } + break; + } + } print.flags = info.flags; print.separatorString = info.separatorString; print.descriptions = descriptions; |