From 305e29b98ef369bcf5574a0a462f43c0bbc7ba5b Mon Sep 17 00:00:00 2001 From: Nikos Nikoleris Date: Fri, 3 Apr 2015 11:42:10 -0500 Subject: cpu: fix system total instructions accounting The totalInstructions counter is only incremented when the whole instruction is commited and not on every microop. It was incorrectly reset in atomic and timing cpus. Committed by: Nilay Vaish " --- src/cpu/o3/cpu.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/cpu/o3') diff --git a/src/cpu/o3/cpu.cc b/src/cpu/o3/cpu.cc index fc7643be2..715a530d7 100644 --- a/src/cpu/o3/cpu.cc +++ b/src/cpu/o3/cpu.cc @@ -1440,16 +1440,16 @@ FullO3CPU::instDone(ThreadID tid, DynInstPtr &inst) thread[tid]->numInst++; thread[tid]->numInsts++; committedInsts[tid]++; + system->totalNumInsts++; + + // Check for instruction-count-based events. + comInstEventQueue[tid]->serviceEvents(thread[tid]->numInst); + system->instEventQueue.serviceEvents(system->totalNumInsts); } thread[tid]->numOp++; thread[tid]->numOps++; committedOps[tid]++; - system->totalNumInsts++; - // Check for instruction-count-based events. - comInstEventQueue[tid]->serviceEvents(thread[tid]->numInst); - system->instEventQueue.serviceEvents(system->totalNumInsts); - probeInstCommit(inst->staticInst); } -- cgit v1.2.3