sim: Call regStats of base-class as well

We want to extend the stats of objects hierarchically and thus it is necessary
to register the statistics of the base-class(es), as well.  For now, these are
empty, but generic stats will be added there.

Patch originally provided by Akash Bagdia at ARM Ltd.
This commit is contained in:
Stephan Diestelhorst 2016-06-06 17:16:43 +01:00
parent 672c06a01d
commit 589033c94c
15 changed files with 30 additions and 0 deletions

View file

@ -2122,6 +2122,8 @@ TableWalker::pageSizeNtoStatBin(uint8_t N)
void void
TableWalker::regStats() TableWalker::regStats()
{ {
ClockedObject::regStats();
statWalks statWalks
.name(name() + ".walks") .name(name() + ".walks")
.desc("Table walker walks requested") .desc("Table walker walks requested")

View file

@ -417,6 +417,7 @@ TLB::unserialize(CheckpointIn &cp)
void void
TLB::regStats() TLB::regStats()
{ {
BaseTLB::regStats();
instHits instHits
.name(name() + ".inst_hits") .name(name() + ".inst_hits")
.desc("ITB inst hits") .desc("ITB inst hits")

View file

@ -397,6 +397,8 @@ BaseCPU::probeInstCommit(const StaticInstPtr &inst)
void void
BaseCPU::regStats() BaseCPU::regStats()
{ {
MemObject::regStats();
using namespace Stats; using namespace Stats;
numCycles numCycles

View file

@ -526,6 +526,8 @@ TrafficGen::noProgress()
void void
TrafficGen::regStats() TrafficGen::regStats()
{ {
ClockedObject::regStats();
// Initialise all the stats // Initialise all the stats
using namespace Stats; using namespace Stats;

View file

@ -36,6 +36,8 @@
void void
EtherDevice::regStats() EtherDevice::regStats()
{ {
PciDevice::regStats();
txBytes txBytes
.name(name() + ".txBytes") .name(name() + ".txBytes")
.desc("Bytes Transmitted") .desc("Bytes Transmitted")

View file

@ -425,6 +425,8 @@ CopyEngine::CopyEngineChannel::channelWrite(Packet *pkt, Addr daddr, int size)
void void
CopyEngine::regStats() CopyEngine::regStats()
{ {
PciDevice::regStats();
using namespace Stats; using namespace Stats;
bytesCopied bytesCopied
.init(regs.chanCount) .init(regs.chanCount)

View file

@ -392,6 +392,8 @@ IdeDisk::doDmaDataRead()
void void
IdeDisk::regStats() IdeDisk::regStats()
{ {
SimObject::regStats();
using namespace Stats; using namespace Stats;
dmaReadFullPages dmaReadFullPages
.name(name() + ".dma_read_full_pages") .name(name() + ".dma_read_full_pages")

View file

@ -79,6 +79,8 @@ AbstractMemory::setBackingStore(uint8_t* pmem_addr)
void void
AbstractMemory::regStats() AbstractMemory::regStats()
{ {
MemObject::regStats();
using namespace Stats; using namespace Stats;
assert(system()); assert(system());

View file

@ -176,6 +176,8 @@ BaseCache::inRange(Addr addr) const
void void
BaseCache::regStats() BaseCache::regStats()
{ {
MemObject::regStats();
using namespace Stats; using namespace Stats;
// Hit statistics // Hit statistics

View file

@ -74,6 +74,8 @@ BasePrefetcher::setCache(BaseCache *_cache)
void void
BasePrefetcher::regStats() BasePrefetcher::regStats()
{ {
ClockedObject::regStats();
pfIssued pfIssued
.name(name() + ".num_hwpf_issued") .name(name() + ".num_hwpf_issued")
.desc("number of hwpf issued") .desc("number of hwpf issued")

View file

@ -71,7 +71,10 @@ BaseTags::setCache(BaseCache *_cache)
void void
BaseTags::regStats() BaseTags::regStats()
{ {
ClockedObject::regStats();
using namespace Stats; using namespace Stats;
replacements replacements
.init(maxThreadsPerCPU) .init(maxThreadsPerCPU)
.name(name() + ".replacements") .name(name() + ".replacements")

View file

@ -384,6 +384,8 @@ CommMonitor::recvRangeChange()
void void
CommMonitor::regStats() CommMonitor::regStats()
{ {
MemObject::regStats();
// Initialise all the monitor stats // Initialise all the monitor stats
using namespace Stats; using namespace Stats;

View file

@ -541,6 +541,8 @@ BaseXBar::getAddrRanges() const
void void
BaseXBar::regStats() BaseXBar::regStats()
{ {
ClockedObject::regStats();
using namespace Stats; using namespace Stats;
transDist transDist

View file

@ -191,6 +191,8 @@ Process::Process(ProcessParams * params)
void void
Process::regStats() Process::regStats()
{ {
SimObject::regStats();
using namespace Stats; using namespace Stats;
num_syscalls num_syscalls

View file

@ -393,6 +393,8 @@ System::unserialize(CheckpointIn &cp)
void void
System::regStats() System::regStats()
{ {
MemObject::regStats();
for (uint32_t j = 0; j < numWorkIds ; j++) { for (uint32_t j = 0; j < numWorkIds ; j++) {
workItemStats[j] = new Stats::Histogram(); workItemStats[j] = new Stats::Histogram();
stringstream namestr; stringstream namestr;