power: Add error checking to MathExprPowerModel
authorAndreas Sandberg <andreas.sandberg@arm.com>
Wed, 5 Apr 2017 15:38:00 +0000 (16:38 +0100)
committerAndreas Sandberg <andreas.sandberg@arm.com>
Thu, 6 Apr 2017 13:35:17 +0000 (13:35 +0000)
commit0b223f4001fce26cad3b3c7e03501e7222d85ee0
treea6ac967bff398bb5fbd8ae43e5fd1bf0b2cce49a
parent01bc2ea80d514abb5009869fc6b765208192906f
power: Add error checking to MathExprPowerModel

MathExprPower model currently doesn't print any useful error messages
if an expression fails to evaluate. To add insult to injury, the model
only detects a failure when dumping stats and not at
initialization. This change adds a verification step in startup() that
ensures that all of the referenced stats actually exist.

Change-Id: I8f71c73341578d5882c8d93e482f5383fbda5f1d
Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-by: Sascha Bischoff <sascha.bischoff@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/2661
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>
src/sim/power/mathexpr_powermodel.cc
src/sim/power/mathexpr_powermodel.hh