From 70798b1ba0a5b9a7242b48bf9598957476f8168b Mon Sep 17 00:00:00 2001 From: David Guillen Fandos Date: Mon, 6 Jun 2016 17:16:43 +0100 Subject: 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 --- src/cpu/o3/probe/elastic_trace.cc | 2 ++ src/cpu/pred/bpred_unit.cc | 2 ++ src/cpu/testers/memtest/memtest.cc | 2 ++ 3 files changed, 6 insertions(+) (limited to 'src/cpu') diff --git a/src/cpu/o3/probe/elastic_trace.cc b/src/cpu/o3/probe/elastic_trace.cc index 3332816ca..bf6b6f002 100644 --- a/src/cpu/o3/probe/elastic_trace.cc +++ b/src/cpu/o3/probe/elastic_trace.cc @@ -870,6 +870,8 @@ ElasticTrace::writeDepTrace(uint32_t num_to_write) void ElasticTrace::regStats() { + ProbeListenerObject::regStats(); + using namespace Stats; numRegDep .name(name() + ".numRegDep") diff --git a/src/cpu/pred/bpred_unit.cc b/src/cpu/pred/bpred_unit.cc index 91e43f50e..523697ff6 100644 --- a/src/cpu/pred/bpred_unit.cc +++ b/src/cpu/pred/bpred_unit.cc @@ -80,6 +80,8 @@ BPredUnit::BPredUnit(const Params *params) void BPredUnit::regStats() { + SimObject::regStats(); + lookups .name(name() + ".lookups") .desc("Number of BP lookups") diff --git a/src/cpu/testers/memtest/memtest.cc b/src/cpu/testers/memtest/memtest.cc index 3e0d67c32..c2c721bcf 100644 --- a/src/cpu/testers/memtest/memtest.cc +++ b/src/cpu/testers/memtest/memtest.cc @@ -197,6 +197,8 @@ MemTest::completeRequest(PacketPtr pkt, bool functional) void MemTest::regStats() { + MemObject::regStats(); + using namespace Stats; numReadsStat -- cgit v1.2.3