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/minor/execute.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/cpu/minor') diff --git a/src/cpu/minor/execute.cc b/src/cpu/minor/execute.cc index f7b773377..706fdf010 100644 --- a/src/cpu/minor/execute.cc +++ b/src/cpu/minor/execute.cc @@ -840,15 +840,15 @@ Execute::doInstCommitAccounting(MinorDynInstPtr inst) thread->numInst++; thread->numInsts++; cpu.stats.numInsts++; + cpu.system->totalNumInsts++; + + /* Act on events related to instruction counts */ + cpu.comInstEventQueue[inst->id.threadId]->serviceEvents(thread->numInst); + cpu.system->instEventQueue.serviceEvents(cpu.system->totalNumInsts); } thread->numOp++; thread->numOps++; cpu.stats.numOps++; - cpu.system->totalNumInsts++; - - /* Act on events related to instruction counts */ - cpu.comInstEventQueue[inst->id.threadId]->serviceEvents(thread->numInst); - cpu.system->instEventQueue.serviceEvents(cpu.system->totalNumInsts); /* Set the CP SeqNum to the numOps commit number */ if (inst->traceData) -- cgit v1.2.3