changeset 074694750c5d in /z/repo/gem5
details: http://repo.gem5.org/gem5?cmd=changeset;node=074694750c5d
description:
        stats: Add more information to uninitialized error

        ClockedObject was changed to require its regStats() to be called from 
every
        child class. If you forget to do this, the error was indecipherable. 
This
        patch makes the error more clear.

diffstat:

 src/base/statistics.cc |  4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diffs (14 lines):

diff -r b4d943429dc6 -r 074694750c5d src/base/statistics.cc
--- a/src/base/statistics.cc    Thu Oct 13 23:21:40 2016 +0100
+++ b/src/base/statistics.cc    Fri Oct 14 09:02:03 2016 -0500
@@ -221,7 +221,9 @@
 #ifdef DEBUG
         cprintf("this is stat number %d\n", id);
 #endif
-        panic("Not all stats have been initialized");
+        panic("Not all stats have been initialized.\n"
+              "You may need to add <ParentClass>::regStats() to a"
+              " new SimObject's regStats() function.");
         return false;
     }
 
_______________________________________________
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to