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>
This commit is contained in:
parent
589033c94c
commit
70798b1ba0
30 changed files with 58 additions and 12 deletions
|
@ -76,6 +76,8 @@ TLB::~TLB()
|
||||||
void
|
void
|
||||||
TLB::regStats()
|
TLB::regStats()
|
||||||
{
|
{
|
||||||
|
BaseTLB::regStats();
|
||||||
|
|
||||||
fetch_hits
|
fetch_hits
|
||||||
.name(name() + ".fetch_hits")
|
.name(name() + ".fetch_hits")
|
||||||
.desc("ITB hits");
|
.desc("ITB hits");
|
||||||
|
|
|
@ -226,6 +226,8 @@ TLB::unserialize(CheckpointIn &cp)
|
||||||
void
|
void
|
||||||
TLB::regStats()
|
TLB::regStats()
|
||||||
{
|
{
|
||||||
|
BaseTLB::regStats();
|
||||||
|
|
||||||
read_hits
|
read_hits
|
||||||
.name(name() + ".read_hits")
|
.name(name() + ".read_hits")
|
||||||
.desc("DTB read hits")
|
.desc("DTB read hits")
|
||||||
|
|
|
@ -223,6 +223,8 @@ TLB::unserialize(CheckpointIn &cp)
|
||||||
void
|
void
|
||||||
TLB::regStats()
|
TLB::regStats()
|
||||||
{
|
{
|
||||||
|
BaseTLB::regStats();
|
||||||
|
|
||||||
read_hits
|
read_hits
|
||||||
.name(name() + ".read_hits")
|
.name(name() + ".read_hits")
|
||||||
.desc("DTB read hits")
|
.desc("DTB read hits")
|
||||||
|
|
|
@ -870,6 +870,8 @@ ElasticTrace::writeDepTrace(uint32_t num_to_write)
|
||||||
|
|
||||||
void
|
void
|
||||||
ElasticTrace::regStats() {
|
ElasticTrace::regStats() {
|
||||||
|
ProbeListenerObject::regStats();
|
||||||
|
|
||||||
using namespace Stats;
|
using namespace Stats;
|
||||||
numRegDep
|
numRegDep
|
||||||
.name(name() + ".numRegDep")
|
.name(name() + ".numRegDep")
|
||||||
|
|
|
@ -80,6 +80,8 @@ BPredUnit::BPredUnit(const Params *params)
|
||||||
void
|
void
|
||||||
BPredUnit::regStats()
|
BPredUnit::regStats()
|
||||||
{
|
{
|
||||||
|
SimObject::regStats();
|
||||||
|
|
||||||
lookups
|
lookups
|
||||||
.name(name() + ".lookups")
|
.name(name() + ".lookups")
|
||||||
.desc("Number of BP lookups")
|
.desc("Number of BP lookups")
|
||||||
|
|
|
@ -197,6 +197,8 @@ MemTest::completeRequest(PacketPtr pkt, bool functional)
|
||||||
void
|
void
|
||||||
MemTest::regStats()
|
MemTest::regStats()
|
||||||
{
|
{
|
||||||
|
MemObject::regStats();
|
||||||
|
|
||||||
using namespace Stats;
|
using namespace Stats;
|
||||||
|
|
||||||
numReadsStat
|
numReadsStat
|
||||||
|
|
|
@ -471,6 +471,8 @@ FlashDevice::getUnknownPages(uint32_t index)
|
||||||
void
|
void
|
||||||
FlashDevice::regStats()
|
FlashDevice::regStats()
|
||||||
{
|
{
|
||||||
|
AbstractNVM::regStats();
|
||||||
|
|
||||||
using namespace Stats;
|
using namespace Stats;
|
||||||
|
|
||||||
std::string fd_name = name() + ".FlashDevice";
|
std::string fd_name = name() + ".FlashDevice";
|
||||||
|
|
|
@ -97,6 +97,8 @@ HDLcd::~HDLcd()
|
||||||
void
|
void
|
||||||
HDLcd::regStats()
|
HDLcd::regStats()
|
||||||
{
|
{
|
||||||
|
AmbaDmaDevice::regStats();
|
||||||
|
|
||||||
using namespace Stats;
|
using namespace Stats;
|
||||||
|
|
||||||
stats.underruns
|
stats.underruns
|
||||||
|
|
|
@ -774,6 +774,8 @@ UFSHostDeviceParams::create()
|
||||||
void
|
void
|
||||||
UFSHostDevice::regStats()
|
UFSHostDevice::regStats()
|
||||||
{
|
{
|
||||||
|
DmaDevice::regStats();
|
||||||
|
|
||||||
using namespace Stats;
|
using namespace Stats;
|
||||||
|
|
||||||
std::string UFSHost_name = name() + ".UFSDiskHost";
|
std::string UFSHost_name = name() + ".UFSDiskHost";
|
||||||
|
|
|
@ -1447,6 +1447,8 @@ ComputeUnit::ITLBPort::recvReqRetry()
|
||||||
void
|
void
|
||||||
ComputeUnit::regStats()
|
ComputeUnit::regStats()
|
||||||
{
|
{
|
||||||
|
MemObject::regStats();
|
||||||
|
|
||||||
tlbCycles
|
tlbCycles
|
||||||
.name(name() + ".tlb_cycles")
|
.name(name() + ".tlb_cycles")
|
||||||
.desc("total number of cycles for all uncoalesced requests")
|
.desc("total number of cycles for all uncoalesced requests")
|
||||||
|
|
|
@ -958,6 +958,8 @@ namespace X86ISA
|
||||||
void
|
void
|
||||||
GpuTLB::regStats()
|
GpuTLB::regStats()
|
||||||
{
|
{
|
||||||
|
MemObject::regStats();
|
||||||
|
|
||||||
localNumTLBAccesses
|
localNumTLBAccesses
|
||||||
.name(name() + ".local_TLB_accesses")
|
.name(name() + ".local_TLB_accesses")
|
||||||
.desc("Number of TLB accesses")
|
.desc("Number of TLB accesses")
|
||||||
|
|
|
@ -331,11 +331,3 @@ LdsState::TickEvent::process()
|
||||||
{
|
{
|
||||||
ldsState->process();
|
ldsState->process();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
void
|
|
||||||
LdsState::regStats()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
|
@ -390,9 +390,6 @@ class LdsState: public MemObject
|
||||||
void
|
void
|
||||||
setParent(ComputeUnit *x_parent);
|
setParent(ComputeUnit *x_parent);
|
||||||
|
|
||||||
void
|
|
||||||
regStats();
|
|
||||||
|
|
||||||
// accessors
|
// accessors
|
||||||
ComputeUnit *
|
ComputeUnit *
|
||||||
getParent() const
|
getParent() const
|
||||||
|
|
|
@ -546,6 +546,8 @@ TLBCoalescer::CleanupEvent::process()
|
||||||
void
|
void
|
||||||
TLBCoalescer::regStats()
|
TLBCoalescer::regStats()
|
||||||
{
|
{
|
||||||
|
MemObject::regStats();
|
||||||
|
|
||||||
uncoalescedAccesses
|
uncoalescedAccesses
|
||||||
.name(name() + ".uncoalesced_accesses")
|
.name(name() + ".uncoalesced_accesses")
|
||||||
.desc("Number of uncoalesced TLB accesses")
|
.desc("Number of uncoalesced TLB accesses")
|
||||||
|
|
|
@ -88,6 +88,8 @@ Wavefront::Wavefront(const Params *p)
|
||||||
void
|
void
|
||||||
Wavefront::regStats()
|
Wavefront::regStats()
|
||||||
{
|
{
|
||||||
|
SimObject::regStats();
|
||||||
|
|
||||||
srcRegOpDist
|
srcRegOpDist
|
||||||
.init(0, 4, 2)
|
.init(0, 4, 2)
|
||||||
.name(name() + ".src_reg_operand_dist")
|
.name(name() + ".src_reg_operand_dist")
|
||||||
|
|
|
@ -57,6 +57,8 @@ StackDistProbe::StackDistProbe(StackDistProbeParams *p)
|
||||||
void
|
void
|
||||||
StackDistProbe::regStats()
|
StackDistProbe::regStats()
|
||||||
{
|
{
|
||||||
|
BaseMemProbe::regStats();
|
||||||
|
|
||||||
const StackDistProbeParams *p(
|
const StackDistProbeParams *p(
|
||||||
dynamic_cast<const StackDistProbeParams *>(params()));
|
dynamic_cast<const StackDistProbeParams *>(params()));
|
||||||
assert(p);
|
assert(p);
|
||||||
|
|
|
@ -69,6 +69,8 @@ BaseGarnetNetwork::init()
|
||||||
void
|
void
|
||||||
BaseGarnetNetwork::regStats()
|
BaseGarnetNetwork::regStats()
|
||||||
{
|
{
|
||||||
|
Network::regStats();
|
||||||
|
|
||||||
m_flits_received
|
m_flits_received
|
||||||
.init(m_virtual_networks)
|
.init(m_virtual_networks)
|
||||||
.name(name() + ".flits_received")
|
.name(name() + ".flits_received")
|
||||||
|
|
|
@ -158,6 +158,8 @@ Router_d::update_sw_winner(int inport, flit_d *t_flit)
|
||||||
void
|
void
|
||||||
Router_d::regStats()
|
Router_d::regStats()
|
||||||
{
|
{
|
||||||
|
BasicRouter::regStats();
|
||||||
|
|
||||||
m_buffer_reads
|
m_buffer_reads
|
||||||
.name(name() + ".buffer_reads")
|
.name(name() + ".buffer_reads")
|
||||||
.flags(Stats::nozero)
|
.flags(Stats::nozero)
|
||||||
|
|
|
@ -132,6 +132,8 @@ SimpleNetwork::makeInternalLink(SwitchID src, SwitchID dest, BasicLink* link,
|
||||||
void
|
void
|
||||||
SimpleNetwork::regStats()
|
SimpleNetwork::regStats()
|
||||||
{
|
{
|
||||||
|
Network::regStats();
|
||||||
|
|
||||||
for (MessageSizeType type = MessageSizeType_FIRST;
|
for (MessageSizeType type = MessageSizeType_FIRST;
|
||||||
type < MessageSizeType_NUM; ++type) {
|
type < MessageSizeType_NUM; ++type) {
|
||||||
m_msg_counts[(unsigned int) type]
|
m_msg_counts[(unsigned int) type]
|
||||||
|
|
|
@ -112,6 +112,8 @@ Switch::getThrottle(LinkID link_number) const
|
||||||
void
|
void
|
||||||
Switch::regStats()
|
Switch::regStats()
|
||||||
{
|
{
|
||||||
|
BasicRouter::regStats();
|
||||||
|
|
||||||
for (int link = 0; link < m_throttles.size(); link++) {
|
for (int link = 0; link < m_throttles.size(); link++) {
|
||||||
m_throttles[link]->regStats(name());
|
m_throttles[link]->regStats(name());
|
||||||
}
|
}
|
||||||
|
|
|
@ -76,6 +76,8 @@ AbstractController::resetStats()
|
||||||
void
|
void
|
||||||
AbstractController::regStats()
|
AbstractController::regStats()
|
||||||
{
|
{
|
||||||
|
MemObject::regStats();
|
||||||
|
|
||||||
m_fully_busy_cycles
|
m_fully_busy_cycles
|
||||||
.name(name() + ".fully_busy_cycles")
|
.name(name() + ".fully_busy_cycles")
|
||||||
.desc("cycles for which number of transistions == max transitions")
|
.desc("cycles for which number of transistions == max transitions")
|
||||||
|
|
|
@ -488,6 +488,8 @@ CacheMemory::isLocked(Addr address, int context)
|
||||||
void
|
void
|
||||||
CacheMemory::regStats()
|
CacheMemory::regStats()
|
||||||
{
|
{
|
||||||
|
SimObject::regStats();
|
||||||
|
|
||||||
m_demand_hits
|
m_demand_hits
|
||||||
.name(name() + ".demand_hits")
|
.name(name() + ".demand_hits")
|
||||||
.desc("Number of cache demand hits")
|
.desc("Number of cache demand hits")
|
||||||
|
|
|
@ -86,6 +86,8 @@ Prefetcher::~Prefetcher()
|
||||||
void
|
void
|
||||||
Prefetcher::regStats()
|
Prefetcher::regStats()
|
||||||
{
|
{
|
||||||
|
SimObject::regStats();
|
||||||
|
|
||||||
numMissObserved
|
numMissObserved
|
||||||
.name(name() + ".miss_observed")
|
.name(name() + ".miss_observed")
|
||||||
.desc("number of misses observed")
|
.desc("number of misses observed")
|
||||||
|
|
|
@ -1284,6 +1284,8 @@ GPUCoalescer::recordMissLatency(GPUCoalescerRequest* srequest,
|
||||||
void
|
void
|
||||||
GPUCoalescer::regStats()
|
GPUCoalescer::regStats()
|
||||||
{
|
{
|
||||||
|
RubyPort::regStats();
|
||||||
|
|
||||||
// These statistical variables are not for display.
|
// These statistical variables are not for display.
|
||||||
// The profiler will collate these across different
|
// The profiler will collate these across different
|
||||||
// coalescers and display those collated statistics.
|
// coalescers and display those collated statistics.
|
||||||
|
|
|
@ -89,7 +89,10 @@ class RubySystem : public ClockedObject
|
||||||
return m_profiler;
|
return m_profiler;
|
||||||
}
|
}
|
||||||
|
|
||||||
void regStats() override { m_profiler->regStats(name()); }
|
void regStats() override {
|
||||||
|
ClockedObject::regStats();
|
||||||
|
m_profiler->regStats(name());
|
||||||
|
}
|
||||||
void collateStats() { m_profiler->collateStats(); }
|
void collateStats() { m_profiler->collateStats(); }
|
||||||
void resetStats() override;
|
void resetStats() override;
|
||||||
|
|
||||||
|
|
|
@ -721,6 +721,8 @@ Sequencer::evictionCallback(Addr address)
|
||||||
void
|
void
|
||||||
Sequencer::regStats()
|
Sequencer::regStats()
|
||||||
{
|
{
|
||||||
|
RubyPort::regStats();
|
||||||
|
|
||||||
m_store_waiting_on_load
|
m_store_waiting_on_load
|
||||||
.name(name() + ".store_waiting_on_load")
|
.name(name() + ".store_waiting_on_load")
|
||||||
.desc("Number of times a store aliased with a pending load")
|
.desc("Number of times a store aliased with a pending load")
|
||||||
|
|
|
@ -351,6 +351,8 @@ SnoopFilter::updateResponse(const Packet* cpkt, const SlavePort& slave_port)
|
||||||
void
|
void
|
||||||
SnoopFilter::regStats()
|
SnoopFilter::regStats()
|
||||||
{
|
{
|
||||||
|
SimObject::regStats();
|
||||||
|
|
||||||
totRequests
|
totRequests
|
||||||
.name(name() + ".tot_requests")
|
.name(name() + ".tot_requests")
|
||||||
.desc("Total number of requests made to the snoop filter.");
|
.desc("Total number of requests made to the snoop filter.");
|
||||||
|
|
|
@ -56,6 +56,8 @@
|
||||||
void
|
void
|
||||||
ClockDomain::regStats()
|
ClockDomain::regStats()
|
||||||
{
|
{
|
||||||
|
SimObject::regStats();
|
||||||
|
|
||||||
using namespace Stats;
|
using namespace Stats;
|
||||||
|
|
||||||
// Expose the current clock period as a stat for observability in
|
// Expose the current clock period as a stat for observability in
|
||||||
|
|
|
@ -72,6 +72,8 @@ ThermalDomain::setSubSystem(SubSystem * ss)
|
||||||
void
|
void
|
||||||
ThermalDomain::regStats()
|
ThermalDomain::regStats()
|
||||||
{
|
{
|
||||||
|
SimObject::regStats();
|
||||||
|
|
||||||
currentTemp
|
currentTemp
|
||||||
.method(this, &ThermalDomain::currentTemperature)
|
.method(this, &ThermalDomain::currentTemperature)
|
||||||
.name(params()->name + ".temp")
|
.name(params()->name + ".temp")
|
||||||
|
|
|
@ -128,6 +128,8 @@ VoltageDomain::startup() {
|
||||||
void
|
void
|
||||||
VoltageDomain::regStats()
|
VoltageDomain::regStats()
|
||||||
{
|
{
|
||||||
|
SimObject::regStats();
|
||||||
|
|
||||||
currentVoltage
|
currentVoltage
|
||||||
.method(this, &VoltageDomain::voltage)
|
.method(this, &VoltageDomain::voltage)
|
||||||
.name(params()->name + ".voltage")
|
.name(params()->name + ".voltage")
|
||||||
|
|
Loading…
Reference in a new issue