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:
@@ -36,6 +36,8 @@
|
||||
void
|
||||
EtherDevice::regStats()
|
||||
{
|
||||
PciDevice::regStats();
|
||||
|
||||
txBytes
|
||||
.name(name() + ".txBytes")
|
||||
.desc("Bytes Transmitted")
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -392,6 +392,8 @@ IdeDisk::doDmaDataRead()
|
||||
void
|
||||
IdeDisk::regStats()
|
||||
{
|
||||
SimObject::regStats();
|
||||
|
||||
using namespace Stats;
|
||||
dmaReadFullPages
|
||||
.name(name() + ".dma_read_full_pages")
|
||||
|
||||
Reference in New Issue
Block a user