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
TableWalker::regStats()
{
ClockedObject::regStats();
statWalks
.name(name() + ".walks")
.desc("Table walker walks requested")

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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