base-stats,misc: Rename Stats namespace as statistics

As part of recent decisions regarding namespace
naming conventions, all namespaces will be changed
to snake case.

::Stats became ::statistics.

"statistics" was chosen over "stats" to avoid generating
conflicts with the already existing variables (there are
way too many "stats" in the codebase), which would make
this patch even more disturbing for the users.

Change-Id: If877b12d7dac356f86e3b3d941bf7558a4fd8719
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/45421
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
Daniel R. Carvalho
2021-05-06 20:00:51 -03:00
committed by Daniel Carvalho
parent fa505f1c23
commit 98ac080ec4
228 changed files with 3078 additions and 2970 deletions

View File

@@ -189,11 +189,11 @@ MemTest::completeRequest(PacketPtr pkt, bool functional)
else if (noResponseEvent.scheduled())
deschedule(noResponseEvent);
}
MemTest::MemTestStats::MemTestStats(Stats::Group *parent)
: Stats::Group(parent),
ADD_STAT(numReads, Stats::units::Count::get(),
MemTest::MemTestStats::MemTestStats(statistics::Group *parent)
: statistics::Group(parent),
ADD_STAT(numReads, statistics::units::Count::get(),
"number of read accesses completed"),
ADD_STAT(numWrites, Stats::units::Count::get(),
ADD_STAT(numWrites, statistics::units::Count::get(),
"number of write accesses completed")
{

View File

@@ -166,11 +166,11 @@ class MemTest : public ClockedObject
const bool suppressFuncErrors;
protected:
struct MemTestStats : public Stats::Group
struct MemTestStats : public statistics::Group
{
MemTestStats(Stats::Group *parent);
Stats::Scalar numReads;
Stats::Scalar numWrites;
MemTestStats(statistics::Group *parent);
statistics::Scalar numReads;
statistics::Scalar numWrites;
} stats;
/**

View File

@@ -330,36 +330,36 @@ BaseTrafficGen::noProgress()
name(), progressCheck);
}
BaseTrafficGen::StatGroup::StatGroup(Stats::Group *parent)
: Stats::Group(parent),
ADD_STAT(numSuppressed, Stats::units::Count::get(),
BaseTrafficGen::StatGroup::StatGroup(statistics::Group *parent)
: statistics::Group(parent),
ADD_STAT(numSuppressed, statistics::units::Count::get(),
"Number of suppressed packets to non-memory space"),
ADD_STAT(numPackets, Stats::units::Count::get(),
ADD_STAT(numPackets, statistics::units::Count::get(),
"Number of packets generated"),
ADD_STAT(numRetries, Stats::units::Count::get(), "Number of retries"),
ADD_STAT(retryTicks, Stats::units::Tick::get(),
ADD_STAT(numRetries, statistics::units::Count::get(), "Number of retries"),
ADD_STAT(retryTicks, statistics::units::Tick::get(),
"Time spent waiting due to back-pressure"),
ADD_STAT(bytesRead, Stats::units::Byte::get(), "Number of bytes read"),
ADD_STAT(bytesWritten, Stats::units::Byte::get(),
ADD_STAT(bytesRead, statistics::units::Byte::get(), "Number of bytes read"),
ADD_STAT(bytesWritten, statistics::units::Byte::get(),
"Number of bytes written"),
ADD_STAT(totalReadLatency, Stats::units::Tick::get(),
ADD_STAT(totalReadLatency, statistics::units::Tick::get(),
"Total latency of read requests"),
ADD_STAT(totalWriteLatency, Stats::units::Tick::get(),
ADD_STAT(totalWriteLatency, statistics::units::Tick::get(),
"Total latency of write requests"),
ADD_STAT(totalReads, Stats::units::Count::get(), "Total num of reads"),
ADD_STAT(totalWrites, Stats::units::Count::get(), "Total num of writes"),
ADD_STAT(avgReadLatency, Stats::units::Rate<
Stats::units::Tick, Stats::units::Count>::get(),
ADD_STAT(totalReads, statistics::units::Count::get(), "Total num of reads"),
ADD_STAT(totalWrites, statistics::units::Count::get(), "Total num of writes"),
ADD_STAT(avgReadLatency, statistics::units::Rate<
statistics::units::Tick, statistics::units::Count>::get(),
"Avg latency of read requests", totalReadLatency / totalReads),
ADD_STAT(avgWriteLatency, Stats::units::Rate<
Stats::units::Tick, Stats::units::Count>::get(),
ADD_STAT(avgWriteLatency, statistics::units::Rate<
statistics::units::Tick, statistics::units::Count>::get(),
"Avg latency of write requests",
totalWriteLatency / totalWrites),
ADD_STAT(readBW, Stats::units::Rate<
Stats::units::Byte, Stats::units::Second>::get(),
ADD_STAT(readBW, statistics::units::Rate<
statistics::units::Byte, statistics::units::Second>::get(),
"Read bandwidth", bytesRead / simSeconds),
ADD_STAT(writeBW, Stats::units::Rate<
Stats::units::Byte, Stats::units::Second>::get(),
ADD_STAT(writeBW, statistics::units::Rate<
statistics::units::Byte, statistics::units::Second>::get(),
"Write bandwidth", bytesWritten / simSeconds)
{
}

View File

@@ -191,51 +191,51 @@ class BaseTrafficGen : public ClockedObject
/** Reqs waiting for response **/
std::unordered_map<RequestPtr,Tick> waitingResp;
struct StatGroup : public Stats::Group
struct StatGroup : public statistics::Group
{
StatGroup(Stats::Group *parent);
StatGroup(statistics::Group *parent);
/** Count the number of dropped requests. */
Stats::Scalar numSuppressed;
statistics::Scalar numSuppressed;
/** Count the number of generated packets. */
Stats::Scalar numPackets;
statistics::Scalar numPackets;
/** Count the number of retries. */
Stats::Scalar numRetries;
statistics::Scalar numRetries;
/** Count the time incurred from back-pressure. */
Stats::Scalar retryTicks;
statistics::Scalar retryTicks;
/** Count the number of bytes read. */
Stats::Scalar bytesRead;
statistics::Scalar bytesRead;
/** Count the number of bytes written. */
Stats::Scalar bytesWritten;
statistics::Scalar bytesWritten;
/** Total num of ticks read reqs took to complete */
Stats::Scalar totalReadLatency;
statistics::Scalar totalReadLatency;
/** Total num of ticks write reqs took to complete */
Stats::Scalar totalWriteLatency;
statistics::Scalar totalWriteLatency;
/** Count the number reads. */
Stats::Scalar totalReads;
statistics::Scalar totalReads;
/** Count the number writes. */
Stats::Scalar totalWrites;
statistics::Scalar totalWrites;
/** Avg num of ticks each read req took to complete */
Stats::Formula avgReadLatency;
statistics::Formula avgReadLatency;
/** Avg num of ticks each write reqs took to complete */
Stats::Formula avgWriteLatency;
statistics::Formula avgWriteLatency;
/** Read bandwidth in bytes/s */
Stats::Formula readBW;
statistics::Formula readBW;
/** Write bandwidth in bytes/s */
Stats::Formula writeBW;
statistics::Formula writeBW;
} stats;
public: