projects
/
gem5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c87b717
)
stats: Add more information to uninitialized error
author
Jason Lowe-Power
<powerjg@cs.wisc.edu>
Fri, 14 Oct 2016 14:02:03 +0000
(09:02 -0500)
committer
Jason Lowe-Power
<powerjg@cs.wisc.edu>
Fri, 14 Oct 2016 14:02:03 +0000
(09:02 -0500)
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.
src/base/statistics.cc
patch
|
blob
|
history
diff --git
a/src/base/statistics.cc
b/src/base/statistics.cc
index 4c14bc52229e24beeab7e864e6d8347e3aa585bc..b1b5c927ea7fba1d16f2460b860753972eed1b44 100644
(file)
--- 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;
}