summaryrefslogtreecommitdiff
path: root/src/sim
diff options
context:
space:
mode:
authorDavid Guillen Fandos <david.guillen@arm.com>2016-06-06 17:16:43 +0100
committerDavid Guillen Fandos <david.guillen@arm.com>2016-06-06 17:16:43 +0100
commit70798b1ba0a5b9a7242b48bf9598957476f8168b (patch)
tree5cdcb4e59a49483ac44eeda3af557fc573038034 /src/sim
parent589033c94c0381fe4e67cebe08352b6e1fbcde2e (diff)
downloadgem5-70798b1ba0a5b9a7242b48bf9598957476f8168b.tar.xz
stats: Fixing regStats function for some SimObjects
Fixing an issue with regStats not calling the parent class method for most SimObjects in Gem5. This causes issues if one adds new stats in the base class (since they are never initialized properly!). Change-Id: Iebc5aa66f58816ef4295dc8e48a357558d76a77c Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Diffstat (limited to 'src/sim')
-rw-r--r--src/sim/clock_domain.cc2
-rw-r--r--src/sim/power/thermal_domain.cc2
-rw-r--r--src/sim/voltage_domain.cc2
3 files changed, 6 insertions, 0 deletions
diff --git a/src/sim/clock_domain.cc b/src/sim/clock_domain.cc
index 1ccee7f1d..9865c4d11 100644
--- a/src/sim/clock_domain.cc
+++ b/src/sim/clock_domain.cc
@@ -56,6 +56,8 @@
void
ClockDomain::regStats()
{
+ SimObject::regStats();
+
using namespace Stats;
// Expose the current clock period as a stat for observability in
diff --git a/src/sim/power/thermal_domain.cc b/src/sim/power/thermal_domain.cc
index 4b840670d..208c5bab4 100644
--- a/src/sim/power/thermal_domain.cc
+++ b/src/sim/power/thermal_domain.cc
@@ -72,6 +72,8 @@ ThermalDomain::setSubSystem(SubSystem * ss)
void
ThermalDomain::regStats()
{
+ SimObject::regStats();
+
currentTemp
.method(this, &ThermalDomain::currentTemperature)
.name(params()->name + ".temp")
diff --git a/src/sim/voltage_domain.cc b/src/sim/voltage_domain.cc
index b82efda33..61715dfbc 100644
--- a/src/sim/voltage_domain.cc
+++ b/src/sim/voltage_domain.cc
@@ -128,6 +128,8 @@ VoltageDomain::startup() {
void
VoltageDomain::regStats()
{
+ SimObject::regStats();
+
currentVoltage
.method(this, &VoltageDomain::voltage)
.name(params()->name + ".voltage")