From: Giacomo Travaglini Date: Thu, 12 Mar 2020 16:21:01 +0000 (+0000) Subject: power: Fix regStats for PowerModel and PowerModelState X-Git-Tag: v20.0.0.0~337 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2f350b822abfe4ed0cf88242e3f833e7a01789ec;p=gem5.git power: Fix regStats for PowerModel and PowerModelState Every Stats::Group need to call the parent regStats to make sure that the base Stats::Group::regStats() gets called JIRA: https://gem5.atlassian.net/projects/GEM5/issues/GEM5-319 Change-Id: I931941d8ec5f375f7e51e719d43ae31af095f661 Signed-off-by: Giacomo Travaglini Reviewed-by: Nikos Nikoleris Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/26643 Tested-by: kokoro --- diff --git a/src/sim/power/power_model.hh b/src/sim/power/power_model.hh index 36e0a3e2a..918b2d2b3 100644 --- a/src/sim/power/power_model.hh +++ b/src/sim/power/power_model.hh @@ -84,6 +84,8 @@ class PowerModelState : public SimObject } void regStats() { + SimObject::regStats(); + dynamicPower .method(this, &PowerModelState::getDynamicPower) .name(params()->name + ".dynamic_power") @@ -135,6 +137,8 @@ class PowerModel : public SimObject double getStaticPower() const; void regStats() { + SimObject::regStats(); + dynamicPower .method(this, &PowerModel::getDynamicPower) .name(params()->name + ".dynamic_power")