summaryrefslogtreecommitdiff
path: root/src/base/statistics.cc
diff options
context:
space:
mode:
authorJason Lowe-Power <powerjg@cs.wisc.edu>2016-10-14 09:02:03 -0500
committerJason Lowe-Power <powerjg@cs.wisc.edu>2016-10-14 09:02:03 -0500
commit824c87634d2d0606f9f62e8a3383c9a056069125 (patch)
tree31b04c573570ecd0c74c0e47371b1ea8f10fd5f9 /src/base/statistics.cc
parentc87b717dbdf36f4b0ebef1df4592f1ebabad15a5 (diff)
downloadgem5-824c87634d2d0606f9f62e8a3383c9a056069125.tar.xz
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 (limited to 'src/base/statistics.cc')
-rw-r--r--src/base/statistics.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/base/statistics.cc b/src/base/statistics.cc
index 4c14bc522..b1b5c927e 100644
--- a/src/base/statistics.cc
+++ b/src/base/statistics.cc
@@ -221,7 +221,9 @@ Info::baseCheck() const
#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;
}