stats: better error message for uninitialized statistic
As suggested by Nathan Binkert in 2008: http://permalink.gmane.org/gmane.comp.emulators.m5.users/2676
This commit is contained in:
parent
0c75581d03
commit
fa4a262204
1 changed files with 2 additions and 1 deletions
|
@ -67,7 +67,8 @@ def enable():
|
||||||
|
|
||||||
for stat in stats_list:
|
for stat in stats_list:
|
||||||
if not stat.check() or not stat.baseCheck():
|
if not stat.check() or not stat.baseCheck():
|
||||||
fatal("stat check failed for '%s' %d\n", stat.name, stat.id)
|
fatal("statistic '%s' (%d) was not properly initialized " \
|
||||||
|
"by a regStats() function\n", stat.name, stat.id)
|
||||||
|
|
||||||
if not (stat.flags & flags.display):
|
if not (stat.flags & flags.display):
|
||||||
stat.name = "__Stat%06d" % stat.id
|
stat.name = "__Stat%06d" % stat.id
|
||||||
|
|
Loading…
Reference in a new issue