changeset 62372a8d4ef2 in /z/repo/gem5
details: http://repo.gem5.org/gem5?cmd=changeset;node=62372a8d4ef2
description:
        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:

 src/base/stats/text.cc |  9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diffs (19 lines):

diff -r 97d873b8b13e -r 62372a8d4ef2 src/base/stats/text.cc
--- a/src/base/stats/text.cc    Mon Jan 09 18:08:20 2012 -0600
+++ b/src/base/stats/text.cc    Mon Jan 09 18:08:20 2012 -0600
@@ -513,7 +513,14 @@
     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;
_______________________________________________
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to