diff options
author | Joel Hestness <hestness@cs.utexas.edu> | 2011-02-06 22:14:17 -0800 |
---|---|---|
committer | Joel Hestness <hestness@cs.utexas.edu> | 2011-02-06 22:14:17 -0800 |
commit | b4c10bd6800b5ab5adee3035f1908d7a49a14ca9 (patch) | |
tree | d21b1bbf5c8df8c77d77b6983779b24189a1d8cb /src/cpu/o3/rob_impl.hh | |
parent | a679e732cee821616c20cc13c22ad2877072ff14 (diff) | |
download | gem5-b4c10bd6800b5ab5adee3035f1908d7a49a14ca9.tar.xz |
mcpat: Adds McPAT performance counters
Updated patches from Rick Strong's set that modify performance counters for
McPAT
Diffstat (limited to 'src/cpu/o3/rob_impl.hh')
-rw-r--r-- | src/cpu/o3/rob_impl.hh | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/cpu/o3/rob_impl.hh b/src/cpu/o3/rob_impl.hh index 37f1c5504..d9d1daded 100644 --- a/src/cpu/o3/rob_impl.hh +++ b/src/cpu/o3/rob_impl.hh @@ -204,6 +204,8 @@ ROB<Impl>::insertInst(DynInstPtr &inst) { assert(inst); + robWrites++; + DPRINTF(ROB, "Adding inst PC %s to the ROB.\n", inst->pcState()); assert(numInstsInROB != numEntries); @@ -237,6 +239,8 @@ template <class Impl> void ROB<Impl>::retireHead(ThreadID tid) { + robWrites++; + assert(numInstsInROB > 0); // Get the head ROB instruction. @@ -271,6 +275,7 @@ template <class Impl> bool ROB<Impl>::isHeadReady(ThreadID tid) { + robReads++; if (threadEntries[tid] != 0) { return instList[tid].front()->readyToCommit(); } @@ -315,6 +320,7 @@ template <class Impl> void ROB<Impl>::doSquash(ThreadID tid) { + robWrites++; DPRINTF(ROB, "[tid:%u]: Squashing instructions until [sn:%i].\n", tid, squashedSeqNum[tid]); @@ -523,3 +529,17 @@ ROB<Impl>::readTailInst(ThreadID tid) return *tail_thread; } +template <class Impl> +void +ROB<Impl>::regStats() +{ + 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"); +} + |