From b4c10bd6800b5ab5adee3035f1908d7a49a14ca9 Mon Sep 17 00:00:00 2001 From: Joel Hestness Date: Sun, 6 Feb 2011 22:14:17 -0800 Subject: mcpat: Adds McPAT performance counters Updated patches from Rick Strong's set that modify performance counters for McPAT --- src/cpu/o3/rob_impl.hh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'src/cpu/o3/rob_impl.hh') 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::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 void ROB::retireHead(ThreadID tid) { + robWrites++; + assert(numInstsInROB > 0); // Get the head ROB instruction. @@ -271,6 +275,7 @@ template bool ROB::isHeadReady(ThreadID tid) { + robReads++; if (threadEntries[tid] != 0) { return instList[tid].front()->readyToCommit(); } @@ -315,6 +320,7 @@ template void ROB::doSquash(ThreadID tid) { + robWrites++; DPRINTF(ROB, "[tid:%u]: Squashing instructions until [sn:%i].\n", tid, squashedSeqNum[tid]); @@ -523,3 +529,17 @@ ROB::readTailInst(ThreadID tid) return *tail_thread; } +template +void +ROB::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"); +} + -- cgit v1.2.3