cpu-o3: convert rob to new style stats
Change-Id: I84430d50c49742cd536dd75ce25184c2316dce51 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/33398 Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Maintainer: Andreas Sandberg <andreas.sandberg@arm.com> Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
committed by
Jason Lowe-Power
parent
0df96ee6bb
commit
c68bce62a5
@@ -443,7 +443,6 @@ FullO3CPU<Impl>::regStats()
|
||||
|
||||
this->rename.regStats();
|
||||
this->iew.regStats();
|
||||
this->rob.regStats();
|
||||
|
||||
intRegfileReads
|
||||
.name(name() + ".int_regfile_reads")
|
||||
|
||||
@@ -257,9 +257,6 @@ class ROB
|
||||
*/
|
||||
size_t countInsts(ThreadID tid);
|
||||
|
||||
/** Registers statistics. */
|
||||
void regStats();
|
||||
|
||||
private:
|
||||
/** Reset the ROB state */
|
||||
void resetState();
|
||||
@@ -323,10 +320,15 @@ class ROB
|
||||
/** Number of active threads. */
|
||||
ThreadID numThreads;
|
||||
|
||||
// The number of rob_reads
|
||||
Stats::Scalar robReads;
|
||||
// The number of rob_writes
|
||||
Stats::Scalar robWrites;
|
||||
|
||||
struct ROBStats : public Stats::Group {
|
||||
ROBStats(Stats::Group *parent);
|
||||
|
||||
// The number of rob_reads
|
||||
Stats::Scalar reads;
|
||||
// The number of rob_writes
|
||||
Stats::Scalar writes;
|
||||
} stats;
|
||||
};
|
||||
|
||||
#endif //__CPU_O3_ROB_HH__
|
||||
|
||||
@@ -58,7 +58,8 @@ ROB<Impl>::ROB(O3CPU *_cpu, DerivO3CPUParams *params)
|
||||
numEntries(params->numROBEntries),
|
||||
squashWidth(params->squashWidth),
|
||||
numInstsInROB(0),
|
||||
numThreads(params->numThreads)
|
||||
numThreads(params->numThreads),
|
||||
stats(_cpu)
|
||||
{
|
||||
//Figure out rob policy
|
||||
if (robPolicy == SMTQueuePolicy::Dynamic) {
|
||||
@@ -204,7 +205,7 @@ ROB<Impl>::insertInst(const DynInstPtr &inst)
|
||||
{
|
||||
assert(inst);
|
||||
|
||||
robWrites++;
|
||||
stats.writes++;
|
||||
|
||||
DPRINTF(ROB, "Adding inst PC %s to the ROB.\n", inst->pcState());
|
||||
|
||||
@@ -239,7 +240,7 @@ template <class Impl>
|
||||
void
|
||||
ROB<Impl>::retireHead(ThreadID tid)
|
||||
{
|
||||
robWrites++;
|
||||
stats.writes++;
|
||||
|
||||
assert(numInstsInROB > 0);
|
||||
|
||||
@@ -274,7 +275,7 @@ template <class Impl>
|
||||
bool
|
||||
ROB<Impl>::isHeadReady(ThreadID tid)
|
||||
{
|
||||
robReads++;
|
||||
stats.reads++;
|
||||
if (threadEntries[tid] != 0) {
|
||||
return instList[tid].front()->readyToCommit();
|
||||
}
|
||||
@@ -319,7 +320,7 @@ template <class Impl>
|
||||
void
|
||||
ROB<Impl>::doSquash(ThreadID tid)
|
||||
{
|
||||
robWrites++;
|
||||
stats.writes++;
|
||||
DPRINTF(ROB, "[tid:%i] Squashing instructions until [sn:%llu].\n",
|
||||
tid, squashedSeqNum[tid]);
|
||||
|
||||
@@ -528,17 +529,11 @@ ROB<Impl>::readTailInst(ThreadID tid)
|
||||
}
|
||||
|
||||
template <class Impl>
|
||||
void
|
||||
ROB<Impl>::regStats()
|
||||
ROB<Impl>::ROBStats::ROBStats(Stats::Group *parent)
|
||||
: Stats::Group(parent, "rob"),
|
||||
ADD_STAT(reads, "The number of ROB reads"),
|
||||
ADD_STAT(writes, "The number of ROB writes")
|
||||
{
|
||||
using namespace Stats;
|
||||
robReads
|
||||
.name(name() + ".rob_reads")
|
||||
.desc("The number of ROB reads");
|
||||
|
||||
robWrites
|
||||
.name(name() + ".rob_writes")
|
||||
.desc("The number of ROB writes");
|
||||
}
|
||||
|
||||
template <class Impl>
|
||||
|
||||
Reference in New Issue
Block a user