From: Hoa Nguyen Date: Fri, 5 Feb 2021 05:20:06 +0000 (-0800) Subject: dev,dev-arm: Remove units from stats description X-Git-Tag: develop-gem5-snapshot~108 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=42e02475070905a8a41ad7823169a79cc651f857;p=gem5.git dev,dev-arm: Remove units from stats description A recent change https://gem5-review.googlesource.com/c/public/gem5/+/40622 allows units to be shown in stats dump; the units in stats descriptions are nolonger necessary. This change removes units from stats descriptions. However, for units that are multiples of a supported unit (e.g. MegaBytes), the units in the descriptions are kept until unit prefixes are supported. Change-Id: I199afbf29fee13b08eeb323c4cb56c8a974dbe94 Signed-off-by: Hoa Nguyen Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/40675 Tested-by: kokoro Reviewed-by: Daniel Carvalho Maintainer: Gabe Black --- diff --git a/src/dev/arm/ufs_device.cc b/src/dev/arm/ufs_device.cc index f7b6d82e7..830b841b2 100644 --- a/src/dev/arm/ufs_device.cc +++ b/src/dev/arm/ufs_device.cc @@ -778,11 +778,11 @@ UFSHostDeviceStats::UFSHostDeviceStats(UFSHostDevice *parent) /** Average bandwidth for reads and writes */ ADD_STAT(averageReadSSDBW, UNIT_RATE(Stats::Units::Byte, Stats::Units::Second), - "Average read bandwidth (bytes/s)", + "Average read bandwidth", totalReadSSD / simSeconds), ADD_STAT(averageWriteSSDBW, UNIT_RATE(Stats::Units::Byte, Stats::Units::Second), - "Average write bandwidth (bytes/s)", + "Average write bandwidth", totalWrittenSSD / simSeconds), ADD_STAT(averageSCSIQueue, UNIT_RATE(Stats::Units::Count, Stats::Units::Tick), diff --git a/src/dev/net/etherdevice.cc b/src/dev/net/etherdevice.cc index 7c817f4fa..9def4795d 100644 --- a/src/dev/net/etherdevice.cc +++ b/src/dev/net/etherdevice.cc @@ -38,10 +38,10 @@ EtherDevice::EtherDeviceStats::EtherDeviceStats(Stats::Group *parent) 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), - "Transmit Bandwidth (bits/s)", + "Transmit Bandwidth", txBytes * Stats::constant(8) / simSeconds), ADD_STAT(rxBandwidth, UNIT_RATE(Stats::Units::Bit, Stats::Units::Second), - "Receive Bandwidth (bits/s)", + "Receive Bandwidth", rxBytes * Stats::constant(8) / simSeconds), ADD_STAT(txIpChecksums, UNIT_COUNT, "Number of tx IP Checksums done by device"), @@ -65,7 +65,7 @@ EtherDevice::EtherDeviceStats::EtherDeviceStats(Stats::Group *parent) "Number of descriptor bytes write w/ DMA"), ADD_STAT(totBandwidth, UNIT_RATE(Stats::Units::Bit, Stats::Units::Second), - "Total Bandwidth (bits/s)", + "Total Bandwidth", txBandwidth + rxBandwidth), ADD_STAT(totPackets, UNIT_COUNT, "Total Packets", txPackets + rxPackets), ADD_STAT(totBytes, UNIT_BYTE, "Total Bytes", txBytes + rxBytes),