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:
parent
672c06a01d
commit
589033c94c
15 changed files with 30 additions and 0 deletions
|
@ -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")
|
||||||
|
|
|
@ -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")
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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;
|
||||||
|
|
||||||
|
|
|
@ -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")
|
||||||
|
|
|
@ -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)
|
||||||
|
|
|
@ -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")
|
||||||
|
|
|
@ -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());
|
||||||
|
|
2
src/mem/cache/base.cc
vendored
2
src/mem/cache/base.cc
vendored
|
@ -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
|
||||||
|
|
2
src/mem/cache/prefetch/base.cc
vendored
2
src/mem/cache/prefetch/base.cc
vendored
|
@ -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")
|
||||||
|
|
3
src/mem/cache/tags/base.cc
vendored
3
src/mem/cache/tags/base.cc
vendored
|
@ -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")
|
||||||
|
|
|
@ -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;
|
||||||
|
|
||||||
|
|
|
@ -541,6 +541,8 @@ BaseXBar::getAddrRanges() const
|
||||||
void
|
void
|
||||||
BaseXBar::regStats()
|
BaseXBar::regStats()
|
||||||
{
|
{
|
||||||
|
ClockedObject::regStats();
|
||||||
|
|
||||||
using namespace Stats;
|
using namespace Stats;
|
||||||
|
|
||||||
transDist
|
transDist
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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;
|
||||||
|
|
Loading…
Reference in a new issue