misc: Switch away from the deprecated UNIT_* macros.
Expand the macros in place. Change-Id: I5dba512b99a1204c23a995e112248b86523b77c8 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/45560 Reviewed-by: Gabe Black <gabe.black@gmail.com> Maintainer: Gabe Black <gabe.black@gmail.com> Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
@@ -32,121 +32,132 @@
|
||||
|
||||
EtherDevice::EtherDeviceStats::EtherDeviceStats(Stats::Group *parent)
|
||||
: Stats::Group(parent, "EtherDevice"),
|
||||
ADD_STAT(postedInterrupts, UNIT_COUNT, "Number of posts to CPU"),
|
||||
ADD_STAT(txBytes, UNIT_BYTE, "Bytes Transmitted"),
|
||||
ADD_STAT(rxBytes, UNIT_BYTE, "Bytes Received"),
|
||||
ADD_STAT(txPackets, UNIT_COUNT, "Number of Packets Transmitted"),
|
||||
ADD_STAT(rxPackets, UNIT_COUNT, "Number of Packets Received"),
|
||||
ADD_STAT(txBandwidth, UNIT_RATE(Stats::Units::Bit, Stats::Units::Second),
|
||||
ADD_STAT(postedInterrupts, Stats::Units::Count::get(),
|
||||
"Number of posts to CPU"),
|
||||
ADD_STAT(txBytes, Stats::Units::Byte::get(),
|
||||
"Bytes Transmitted"),
|
||||
ADD_STAT(rxBytes, Stats::Units::Byte::get(), "Bytes Received"),
|
||||
ADD_STAT(txPackets, Stats::Units::Count::get(),
|
||||
"Number of Packets Transmitted"),
|
||||
ADD_STAT(rxPackets, Stats::Units::Count::get(),
|
||||
"Number of Packets Received"),
|
||||
ADD_STAT(txBandwidth, Stats::Units::Rate<
|
||||
Stats::Units::Bit, Stats::Units::Second>::get(),
|
||||
"Transmit Bandwidth",
|
||||
txBytes * Stats::constant(8) / simSeconds),
|
||||
ADD_STAT(rxBandwidth, UNIT_RATE(Stats::Units::Bit, Stats::Units::Second),
|
||||
ADD_STAT(rxBandwidth, Stats::Units::Rate<
|
||||
Stats::Units::Bit, Stats::Units::Second>::get(),
|
||||
"Receive Bandwidth",
|
||||
rxBytes * Stats::constant(8) / simSeconds),
|
||||
ADD_STAT(txIpChecksums, UNIT_COUNT,
|
||||
ADD_STAT(txIpChecksums, Stats::Units::Count::get(),
|
||||
"Number of tx IP Checksums done by device"),
|
||||
ADD_STAT(rxIpChecksums, UNIT_COUNT,
|
||||
ADD_STAT(rxIpChecksums, Stats::Units::Count::get(),
|
||||
"Number of rx IP Checksums done by device"),
|
||||
ADD_STAT(txTcpChecksums, UNIT_COUNT,
|
||||
ADD_STAT(txTcpChecksums, Stats::Units::Count::get(),
|
||||
"Number of tx TCP Checksums done by device"),
|
||||
ADD_STAT(rxTcpChecksums, UNIT_COUNT,
|
||||
ADD_STAT(rxTcpChecksums, Stats::Units::Count::get(),
|
||||
"Number of rx TCP Checksums done by device"),
|
||||
ADD_STAT(txUdpChecksums, UNIT_COUNT,
|
||||
ADD_STAT(txUdpChecksums, Stats::Units::Count::get(),
|
||||
"Number of tx UDP Checksums done by device"),
|
||||
ADD_STAT(rxUdpChecksums, UNIT_COUNT,
|
||||
ADD_STAT(rxUdpChecksums, Stats::Units::Count::get(),
|
||||
"Number of rx UDP Checksums done by device"),
|
||||
ADD_STAT(descDmaReads, UNIT_COUNT,
|
||||
ADD_STAT(descDmaReads, Stats::Units::Count::get(),
|
||||
"Number of descriptors the device read w/ DMA"),
|
||||
ADD_STAT(descDmaWrites, UNIT_COUNT,
|
||||
ADD_STAT(descDmaWrites, Stats::Units::Count::get(),
|
||||
"Number of descriptors the device wrote w/ DMA"),
|
||||
ADD_STAT(descDmaRdBytes, UNIT_COUNT,
|
||||
ADD_STAT(descDmaRdBytes, Stats::Units::Count::get(),
|
||||
"Number of descriptor bytes read w/ DMA"),
|
||||
ADD_STAT(descDmaWrBytes, UNIT_COUNT,
|
||||
ADD_STAT(descDmaWrBytes, Stats::Units::Count::get(),
|
||||
"Number of descriptor bytes write w/ DMA"),
|
||||
ADD_STAT(totBandwidth,
|
||||
UNIT_RATE(Stats::Units::Bit, Stats::Units::Second),
|
||||
ADD_STAT(totBandwidth, Stats::Units::Rate<
|
||||
Stats::Units::Bit, Stats::Units::Second>::get(),
|
||||
"Total Bandwidth",
|
||||
txBandwidth + rxBandwidth),
|
||||
ADD_STAT(totPackets, UNIT_COUNT, "Total Packets", txPackets + rxPackets),
|
||||
ADD_STAT(totBytes, UNIT_BYTE, "Total Bytes", txBytes + rxBytes),
|
||||
ADD_STAT(totPacketRate,
|
||||
UNIT_RATE(Stats::Units::Count, Stats::Units::Second),
|
||||
ADD_STAT(totPackets, Stats::Units::Count::get(), "Total Packets",
|
||||
txPackets + rxPackets),
|
||||
ADD_STAT(totBytes, Stats::Units::Byte::get(), "Total Bytes",
|
||||
txBytes + rxBytes),
|
||||
ADD_STAT(totPacketRate, Stats::Units::Rate<
|
||||
Stats::Units::Count, Stats::Units::Second>::get(),
|
||||
"Total Packet Tranmission Rate",
|
||||
totPackets / simSeconds),
|
||||
ADD_STAT(txPacketRate,
|
||||
UNIT_RATE(Stats::Units::Count, Stats::Units::Second),
|
||||
ADD_STAT(txPacketRate, Stats::Units::Rate<
|
||||
Stats::Units::Count, Stats::Units::Second>::get(),
|
||||
"Packet Tranmission Rate",
|
||||
txPackets / simSeconds),
|
||||
ADD_STAT(rxPacketRate,
|
||||
UNIT_RATE(Stats::Units::Count, Stats::Units::Second),
|
||||
ADD_STAT(rxPacketRate, Stats::Units::Rate<
|
||||
Stats::Units::Count, Stats::Units::Second>::get(),
|
||||
"Packet Reception Rate",
|
||||
rxPackets / simSeconds),
|
||||
ADD_STAT(postedSwi, UNIT_COUNT,
|
||||
ADD_STAT(postedSwi, Stats::Units::Count::get(),
|
||||
"Number of software interrupts posted to CPU"),
|
||||
ADD_STAT(totalSwi, UNIT_COUNT, "Total number of Swi written to ISR"),
|
||||
ADD_STAT(coalescedSwi,
|
||||
UNIT_RATE(Stats::Units::Count, Stats::Units::Count),
|
||||
ADD_STAT(totalSwi, Stats::Units::Count::get(),
|
||||
"Total number of Swi written to ISR"),
|
||||
ADD_STAT(coalescedSwi, Stats::Units::Rate<
|
||||
Stats::Units::Count, Stats::Units::Count>::get(),
|
||||
"Average number of Swi's coalesced into each post",
|
||||
totalSwi / postedInterrupts),
|
||||
ADD_STAT(postedRxIdle, UNIT_COUNT,
|
||||
ADD_STAT(postedRxIdle, Stats::Units::Count::get(),
|
||||
"Number of rxIdle interrupts posted to CPU"),
|
||||
ADD_STAT(totalRxIdle, UNIT_COUNT,
|
||||
ADD_STAT(totalRxIdle, Stats::Units::Count::get(),
|
||||
"Total number of RxIdle written to ISR"),
|
||||
ADD_STAT(coalescedRxIdle,
|
||||
UNIT_RATE(Stats::Units::Count, Stats::Units::Count),
|
||||
ADD_STAT(coalescedRxIdle, Stats::Units::Rate<
|
||||
Stats::Units::Count, Stats::Units::Count>::get(),
|
||||
"Average number of RxIdle's coalesced into each post",
|
||||
totalRxIdle / postedInterrupts),
|
||||
ADD_STAT(postedRxOk, UNIT_COUNT,
|
||||
ADD_STAT(postedRxOk, Stats::Units::Count::get(),
|
||||
"Number of RxOk interrupts posted to CPU"),
|
||||
ADD_STAT(totalRxOk, UNIT_COUNT, "Total number of RxOk written to ISR"),
|
||||
ADD_STAT(coalescedRxOk,
|
||||
UNIT_RATE(Stats::Units::Count, Stats::Units::Count),
|
||||
ADD_STAT(totalRxOk, Stats::Units::Count::get(),
|
||||
"Total number of RxOk written to ISR"),
|
||||
ADD_STAT(coalescedRxOk, Stats::Units::Rate<
|
||||
Stats::Units::Count, Stats::Units::Count>::get(),
|
||||
"Average number of RxOk's coalesced into each post",
|
||||
totalRxOk / postedInterrupts),
|
||||
ADD_STAT(postedRxDesc, UNIT_COUNT,
|
||||
ADD_STAT(postedRxDesc, Stats::Units::Count::get(),
|
||||
"Number of RxDesc interrupts posted to CPU"),
|
||||
ADD_STAT(totalRxDesc, UNIT_COUNT,
|
||||
ADD_STAT(totalRxDesc, Stats::Units::Count::get(),
|
||||
"Total number of RxDesc written to ISR"),
|
||||
ADD_STAT(coalescedRxDesc,
|
||||
UNIT_RATE(Stats::Units::Count, Stats::Units::Count),
|
||||
ADD_STAT(coalescedRxDesc, Stats::Units::Rate<
|
||||
Stats::Units::Count, Stats::Units::Count>::get(),
|
||||
"Average number of RxDesc's coalesced into each post",
|
||||
totalRxDesc / postedInterrupts),
|
||||
ADD_STAT(postedTxOk, UNIT_COUNT,
|
||||
ADD_STAT(postedTxOk, Stats::Units::Count::get(),
|
||||
"Number of TxOk interrupts posted to CPU"),
|
||||
ADD_STAT(totalTxOk, UNIT_COUNT,
|
||||
ADD_STAT(totalTxOk, Stats::Units::Count::get(),
|
||||
"Total number of TxOk written to ISR"),
|
||||
ADD_STAT(coalescedTxOk,
|
||||
UNIT_RATE(Stats::Units::Count, Stats::Units::Count),
|
||||
ADD_STAT(coalescedTxOk, Stats::Units::Rate<
|
||||
Stats::Units::Count, Stats::Units::Count>::get(),
|
||||
"Average number of TxOk's coalesced into each post",
|
||||
totalTxOk / postedInterrupts),
|
||||
ADD_STAT(postedTxIdle, UNIT_COUNT,
|
||||
ADD_STAT(postedTxIdle, Stats::Units::Count::get(),
|
||||
"Number of TxIdle interrupts posted to CPU"),
|
||||
ADD_STAT(totalTxIdle, UNIT_COUNT,
|
||||
ADD_STAT(totalTxIdle, Stats::Units::Count::get(),
|
||||
"Total number of TxIdle written to ISR"),
|
||||
ADD_STAT(coalescedTxIdle,
|
||||
UNIT_RATE(Stats::Units::Count, Stats::Units::Count),
|
||||
ADD_STAT(coalescedTxIdle, Stats::Units::Rate<
|
||||
Stats::Units::Count, Stats::Units::Count>::get(),
|
||||
"Average number of TxIdle's coalesced into each post",
|
||||
totalTxIdle / postedInterrupts),
|
||||
ADD_STAT(postedTxDesc, UNIT_COUNT,
|
||||
ADD_STAT(postedTxDesc, Stats::Units::Count::get(),
|
||||
"Number of TxDesc interrupts posted to CPU"),
|
||||
ADD_STAT(totalTxDesc, UNIT_COUNT,
|
||||
ADD_STAT(totalTxDesc, Stats::Units::Count::get(),
|
||||
"Total number of TxDesc written to ISR"),
|
||||
ADD_STAT(coalescedTxDesc,
|
||||
UNIT_RATE(Stats::Units::Count, Stats::Units::Count),
|
||||
ADD_STAT(coalescedTxDesc, Stats::Units::Rate<
|
||||
Stats::Units::Count, Stats::Units::Count>::get(),
|
||||
"Average number of TxDesc's coalesced into each post",
|
||||
totalTxDesc / postedInterrupts),
|
||||
ADD_STAT(postedRxOrn, UNIT_COUNT,
|
||||
ADD_STAT(postedRxOrn, Stats::Units::Count::get(),
|
||||
"Number of RxOrn posted to CPU"),
|
||||
ADD_STAT(totalRxOrn, UNIT_COUNT,
|
||||
ADD_STAT(totalRxOrn, Stats::Units::Count::get(),
|
||||
"Total number of RxOrn written to ISR"),
|
||||
ADD_STAT(coalescedRxOrn,
|
||||
UNIT_RATE(Stats::Units::Count, Stats::Units::Count),
|
||||
ADD_STAT(coalescedRxOrn, Stats::Units::Rate<
|
||||
Stats::Units::Count, Stats::Units::Count>::get(),
|
||||
"Average number of RxOrn's coalesced into each post",
|
||||
totalRxOrn / postedInterrupts),
|
||||
ADD_STAT(coalescedTotal,
|
||||
UNIT_RATE(Stats::Units::Count, Stats::Units::Count),
|
||||
ADD_STAT(coalescedTotal, Stats::Units::Rate<
|
||||
Stats::Units::Count, Stats::Units::Count>::get(),
|
||||
"Average number of interrupts coalesced into each post"),
|
||||
ADD_STAT(droppedPackets, UNIT_COUNT, "Number of packets dropped")
|
||||
ADD_STAT(droppedPackets, Stats::Units::Count::get(),
|
||||
"Number of packets dropped")
|
||||
{
|
||||
|
||||
postedInterrupts
|
||||
|
||||
Reference in New Issue
Block a user