stats: remove duplicate instruction stats from the commit stage
authorAnthony Gutierrez <atgutier@umich.edu>
Wed, 12 Sep 2012 15:35:52 +0000 (11:35 -0400)
committerAnthony Gutierrez <atgutier@umich.edu>
Wed, 12 Sep 2012 15:35:52 +0000 (11:35 -0400)
these stats are duplicates of insts/opsCommitted, cause
confusion, and are poorly named.

src/cpu/o3/commit.hh
src/cpu/o3/commit_impl.hh

index d3d1ad34796f68086b06ab45c2134e3f257f6604..489656a7d10fee132b2a74bcb61b4f185a1695bf 100644 (file)
@@ -447,10 +447,6 @@ class DefaultCommit
     /** Updates commit stats based on this instruction. */
     void updateComInstStats(DynInstPtr &inst);
 
-    /** Stat for the total number of committed instructions. */
-    Stats::Scalar commitCommittedInsts;
-    /** Stat for the total number of committed ops. */
-    Stats::Scalar commitCommittedOps;
     /** Stat for the total number of squashed instructions discarded by commit.
      */
     Stats::Scalar commitSquashedInsts;
index 66474c05fef22a6c8e3a7f65d3a04fed78bf2adc..8a2dcdd1f63ec70db8f417e952174abb737deb8d 100644 (file)
@@ -161,14 +161,6 @@ void
 DefaultCommit<Impl>::regStats()
 {
     using namespace Stats;
-    commitCommittedInsts
-        .name(name() + ".commitCommittedInsts")
-        .desc("The number of committed instructions")
-        .prereq(commitCommittedInsts);
-    commitCommittedOps
-        .name(name() + ".commitCommittedOps")
-        .desc("The number of committed instructions")
-        .prereq(commitCommittedInsts);
     commitSquashedInsts
         .name(name() + ".commitSquashedInsts")
         .desc("The number of squashed insts skipped by commit")
@@ -998,16 +990,6 @@ DefaultCommit<Impl>::commitInsts()
                 // Set the doneSeqNum to the youngest committed instruction.
                 toIEW->commitInfo[tid].doneSeqNum = head_inst->seqNum;
 
-                if (!head_inst->isMicroop() || head_inst->isLastMicroop())
-                    ++commitCommittedInsts;
-                ++commitCommittedOps;
-
-                // To match the old model, don't count nops and instruction
-                // prefetches towards the total commit count.
-                if (!head_inst->isNop() && !head_inst->isInstPrefetch()) {
-                    cpu->instDone(tid, head_inst);
-                }
-
                 if (tid == 0) {
                     canHandleInterrupts =  (!head_inst->isDelayedCommit()) &&
                                            ((THE_ISA != ALPHA_ISA) ||
@@ -1369,6 +1351,12 @@ DefaultCommit<Impl>::updateComInstStats(DynInstPtr &inst)
         instsCommitted[tid]++;
     opsCommitted[tid]++;
 
+    // To match the old model, don't count nops and instruction
+    // prefetches towards the total commit count.
+    if (!inst->isNop() && !inst->isInstPrefetch()) {
+        cpu->instDone(tid, inst);
+    }
+
     //
     //  Control Instructions
     //