From: Nilay Vaish Date: Fri, 23 May 2014 11:07:02 +0000 (-0500) Subject: cpu: o3: remove stat totalCommittedInsts X-Git-Tag: stable_2014_08_26~6 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1e26b7ea29ead4a67a060cc66cd72a193db9c766;p=gem5.git cpu: o3: remove stat totalCommittedInsts This patch removes the stat totalCommittedInsts. This variable was used for recording the total number of instructions committed across all the threads of a core. The instructions committed by each thread are recorded invidually. The total would now be generated by summing these individual counts. --- diff --git a/src/cpu/o3/cpu.cc b/src/cpu/o3/cpu.cc index f87e6a923..ac003bc24 100644 --- a/src/cpu/o3/cpu.cc +++ b/src/cpu/o3/cpu.cc @@ -509,16 +509,14 @@ FullO3CPU::regStats() committedInsts .init(numThreads) .name(name() + ".committedInsts") - .desc("Number of Instructions Simulated"); + .desc("Number of Instructions Simulated") + .flags(Stats::total); committedOps .init(numThreads) .name(name() + ".committedOps") - .desc("Number of Ops (including micro ops) Simulated"); - - totalCommittedInsts - .name(name() + ".committedInsts_total") - .desc("Number of Instructions Simulated"); + .desc("Number of Ops (including micro ops) Simulated") + .flags(Stats::total); cpi .name(name() + ".cpi") @@ -530,7 +528,7 @@ FullO3CPU::regStats() .name(name() + ".cpi_total") .desc("CPI: Total CPI of All Threads") .precision(6); - totalCpi = numCycles / totalCommittedInsts; + totalCpi = numCycles / sum(committedInsts); ipc .name(name() + ".ipc") @@ -542,7 +540,7 @@ FullO3CPU::regStats() .name(name() + ".ipc_total") .desc("IPC: Total IPC of All Threads") .precision(6); - totalIpc = totalCommittedInsts / numCycles; + totalIpc = sum(committedInsts) / numCycles; this->fetch.regStats(); this->decode.regStats(); @@ -1601,7 +1599,6 @@ FullO3CPU::instDone(ThreadID tid, DynInstPtr &inst) thread[tid]->numInst++; thread[tid]->numInsts++; committedInsts[tid]++; - totalCommittedInsts++; } thread[tid]->numOp++; thread[tid]->numOps++; diff --git a/src/cpu/o3/cpu.hh b/src/cpu/o3/cpu.hh index dadee5d56..f5f9897e7 100644 --- a/src/cpu/o3/cpu.hh +++ b/src/cpu/o3/cpu.hh @@ -843,8 +843,6 @@ class FullO3CPU : public BaseO3CPU Stats::Vector committedInsts; /** Stat for the number of committed ops (including micro ops) per thread. */ Stats::Vector committedOps; - /** Stat for the total number of committed instructions. */ - Stats::Scalar totalCommittedInsts; /** Stat for the CPI per thread. */ Stats::Formula cpi; /** Stat for the total CPI. */