dev-arm,stats: Update stats style of src/dev/arm
Change-Id: I722e88801bb8ca0f0d75b5a1bf271fa4d4eded17 Signed-off-by: Hoa Nguyen <hoanguyen@ucdavis.edu> Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/36415 Reviewed-by: Giacomo Travaglini <giacomo.travaglini@arm.com> Maintainer: Giacomo Travaglini <giacomo.travaglini@arm.com> Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
@@ -70,6 +70,7 @@ FlashDevice::FlashDevice(const FlashDeviceParams &p):
|
||||
eraseLatency(p.erase_lat),
|
||||
dataDistribution(p.data_distribution),
|
||||
numPlanes(p.num_planes),
|
||||
stats(this),
|
||||
pagesPerBlock(0),
|
||||
pagesPerDisk(0),
|
||||
blocksPerDisk(0),
|
||||
@@ -454,49 +455,39 @@ FlashDevice::getUnknownPages(uint32_t index)
|
||||
return unknownPages[index >> 5] & (0x01 << (index % 32));
|
||||
}
|
||||
|
||||
void
|
||||
FlashDevice::regStats()
|
||||
FlashDevice::
|
||||
FlashDeviceStats::FlashDeviceStats(Stats::Group *parent)
|
||||
: Stats::Group(parent, "FlashDevice"),
|
||||
ADD_STAT(totalGCActivations, "Number of Garbage collector activations"),
|
||||
ADD_STAT(writeAccess, "Histogram of write addresses"),
|
||||
ADD_STAT(readAccess, "Histogram of read addresses"),
|
||||
ADD_STAT(fileSystemAccess, "Histogram of file system accesses"),
|
||||
ADD_STAT(writeLatency, "Histogram of write latency"),
|
||||
ADD_STAT(readLatency, "Histogram of read latency")
|
||||
{
|
||||
AbstractNVM::regStats();
|
||||
|
||||
using namespace Stats;
|
||||
|
||||
std::string fd_name = name() + ".FlashDevice";
|
||||
|
||||
// Register the stats
|
||||
/** Amount of GC activations*/
|
||||
stats.totalGCActivations
|
||||
.name(fd_name + ".totalGCActivations")
|
||||
.desc("Number of Garbage collector activations")
|
||||
totalGCActivations
|
||||
.flags(none);
|
||||
|
||||
/** Histogram of address accesses*/
|
||||
stats.writeAccess
|
||||
writeAccess
|
||||
.init(2)
|
||||
.name(fd_name + ".writeAccessHist")
|
||||
.desc("Histogram of write addresses")
|
||||
.flags(pdf);
|
||||
stats.readAccess
|
||||
readAccess
|
||||
.init(2)
|
||||
.name(fd_name + ".readAccessHist")
|
||||
.desc("Histogram of read addresses")
|
||||
.flags(pdf);
|
||||
stats.fileSystemAccess
|
||||
fileSystemAccess
|
||||
.init(100)
|
||||
.name(fd_name + ".fileSystemAccessHist")
|
||||
.desc("Histogram of file system accesses")
|
||||
.flags(pdf);
|
||||
|
||||
/** Histogram of access latencies*/
|
||||
stats.writeLatency
|
||||
writeLatency
|
||||
.init(100)
|
||||
.name(fd_name + ".writeLatencyHist")
|
||||
.desc("Histogram of write latency")
|
||||
.flags(pdf);
|
||||
stats.readLatency
|
||||
readLatency
|
||||
.init(100)
|
||||
.name(fd_name + ".readLatencyHist")
|
||||
.desc("Histogram of read latency")
|
||||
.flags(pdf);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user