diff options
author | Kevin Lim <ktlim@umich.edu> | 2005-01-21 18:31:30 -0500 |
---|---|---|
committer | Kevin Lim <ktlim@umich.edu> | 2005-01-21 18:31:30 -0500 |
commit | e6b99b07684ca465d83a6d9858fe97a1d5a8177f (patch) | |
tree | eb77f23c2c71fd6b8128a945ca1282f2676ea8f0 /dev | |
parent | 6ac7954242abf87252b2927c213e9e95bb0772ce (diff) | |
parent | fa7fa5a90909b79a97aee187aa1de52d96c9dde1 (diff) | |
download | gem5-e6b99b07684ca465d83a6d9858fe97a1d5a8177f.tar.xz |
Merge zizzer.eecs.umich.edu:/bk/m5
into zamp.eecs.umich.edu:/z/ktlim2/m5-patched/m5-new
--HG--
extra : convert_revision : e802c800a478c297d3aa780a9ea3c6701453d91d
Diffstat (limited to 'dev')
-rw-r--r-- | dev/ns_gige.cc | 33 | ||||
-rw-r--r-- | dev/ns_gige.hh | 4 | ||||
-rw-r--r-- | dev/pktfifo.cc | 2 | ||||
-rw-r--r-- | dev/sinic.cc | 31 | ||||
-rw-r--r-- | dev/sinic.hh | 4 |
5 files changed, 72 insertions, 2 deletions
diff --git a/dev/ns_gige.cc b/dev/ns_gige.cc index e799c10d2..db1474d1c 100644 --- a/dev/ns_gige.cc +++ b/dev/ns_gige.cc @@ -244,7 +244,6 @@ NSGigE::regStats() .precision(0) ; - txBandwidth .name(name() + ".txBandwidth") .desc("Transmit Bandwidth (bits/s)") @@ -259,6 +258,34 @@ NSGigE::regStats() .prereq(rxBytes) ; + totBandwidth + .name(name() + ".totBandwidth") + .desc("Total Bandwidth (bits/s)") + .precision(0) + .prereq(totBytes) + ; + + totPackets + .name(name() + ".totPackets") + .desc("Total Packets") + .precision(0) + .prereq(totBytes) + ; + + totBytes + .name(name() + ".totBytes") + .desc("Total Bytes") + .precision(0) + .prereq(totBytes) + ; + + totPacketRate + .name(name() + ".totPPS") + .desc("Total Tranmission Rate (packets/s)") + .precision(0) + .prereq(totBytes) + ; + txPacketRate .name(name() + ".txPPS") .desc("Packet Tranmission Rate (packets/s)") @@ -449,6 +476,10 @@ NSGigE::regStats() txBandwidth = txBytes * Stats::constant(8) / simSeconds; rxBandwidth = rxBytes * Stats::constant(8) / simSeconds; + totBandwidth = txBandwidth + rxBandwidth; + totBytes = txBytes + rxBytes; + totPackets = txPackets + rxPackets; + txPacketRate = txPackets / simSeconds; rxPacketRate = rxPackets / simSeconds; } diff --git a/dev/ns_gige.hh b/dev/ns_gige.hh index 0b62fbdf3..58060edac 100644 --- a/dev/ns_gige.hh +++ b/dev/ns_gige.hh @@ -379,6 +379,10 @@ class NSGigE : public PciDev Stats::Scalar<> descDmaWrites; Stats::Scalar<> descDmaRdBytes; Stats::Scalar<> descDmaWrBytes; + Stats::Formula totBandwidth; + Stats::Formula totPackets; + Stats::Formula totBytes; + Stats::Formula totPacketRate; Stats::Formula txBandwidth; Stats::Formula rxBandwidth; Stats::Formula txPacketRate; diff --git a/dev/pktfifo.cc b/dev/pktfifo.cc index 79a96cc1d..dcb1c4c03 100644 --- a/dev/pktfifo.cc +++ b/dev/pktfifo.cc @@ -54,7 +54,7 @@ PacketFifo::unserialize(const string &base, Checkpoint *cp, const string §ion) { paramIn(cp, section, base + ".size", _size); - paramIn(cp, section, base + ".maxsize", _maxsize); +// paramIn(cp, section, base + ".maxsize", _maxsize); paramIn(cp, section, base + ".reserved", _reserved); int fifosize; paramIn(cp, section, base + ".packets", fifosize); diff --git a/dev/sinic.cc b/dev/sinic.cc index 56782b589..fa4cd570f 100644 --- a/dev/sinic.cc +++ b/dev/sinic.cc @@ -191,6 +191,34 @@ Device::regStats() .prereq(rxBytes) ; + totBandwidth + .name(name() + ".totBandwidth") + .desc("Total Bandwidth (bits/s)") + .precision(0) + .prereq(totBytes) + ; + + totPackets + .name(name() + ".totPackets") + .desc("Total Packets") + .precision(0) + .prereq(totBytes) + ; + + totBytes + .name(name() + ".totBytes") + .desc("Total Bytes") + .precision(0) + .prereq(totBytes) + ; + + totPacketRate + .name(name() + ".totPPS") + .desc("Total Tranmission Rate (packets/s)") + .precision(0) + .prereq(totBytes) + ; + txBytes .name(name() + ".txBytes") .desc("Bytes Transmitted") @@ -258,6 +286,9 @@ Device::regStats() txBandwidth = txBytes * Stats::constant(8) / simSeconds; rxBandwidth = rxBytes * Stats::constant(8) / simSeconds; + totBandwidth = txBandwidth + rxBandwidth; + totBytes = txBytes + rxBytes; + totPackets = txPackets + rxPackets; txPacketRate = txPackets / simSeconds; rxPacketRate = rxPackets / simSeconds; } diff --git a/dev/sinic.hh b/dev/sinic.hh index 9f265b3f6..9b8920f3b 100644 --- a/dev/sinic.hh +++ b/dev/sinic.hh @@ -262,6 +262,10 @@ class Device : public Base Stats::Scalar<> txBytes; Stats::Formula txBandwidth; + Stats::Formula totBandwidth; + Stats::Formula totPackets; + Stats::Formula totBytes; + Stats::Formula totPacketRate; Stats::Scalar<> txPackets; Stats::Formula txPacketRate; Stats::Scalar<> txIpPackets; |