summaryrefslogtreecommitdiff
path: root/src/cpu/o3/commit_impl.hh
diff options
context:
space:
mode:
authorAnthony Gutierrez <atgutier@umich.edu>2012-02-12 16:07:39 -0600
committerAnthony Gutierrez <atgutier@umich.edu>2012-02-12 16:07:39 -0600
commit542d0ceebca1d24bfb433ce9fe916b0586f8d029 (patch)
tree45afbefa2ec6a79de564d2c4505667a4d974e1f5 /src/cpu/o3/commit_impl.hh
parent230540e655efd09ad057e7fde2ac257f355c06d1 (diff)
downloadgem5-542d0ceebca1d24bfb433ce9fe916b0586f8d029.tar.xz
cpu: add separate stats for insts/ops both globally and per cpu model
Diffstat (limited to 'src/cpu/o3/commit_impl.hh')
-rw-r--r--src/cpu/o3/commit_impl.hh33
1 files changed, 25 insertions, 8 deletions
diff --git a/src/cpu/o3/commit_impl.hh b/src/cpu/o3/commit_impl.hh
index 446c8e6f3..7ca42ae5b 100644
--- a/src/cpu/o3/commit_impl.hh
+++ b/src/cpu/o3/commit_impl.hh
@@ -169,6 +169,10 @@ DefaultCommit<Impl>::regStats()
.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")
@@ -193,13 +197,20 @@ DefaultCommit<Impl>::regStats()
.flags(Stats::pdf)
;
- statComInst
+ instsCommitted
.init(cpu->numThreads)
- .name(name() + ".count")
+ .name(name() + ".committedInsts")
.desc("Number of instructions committed")
.flags(total)
;
+ opsCommitted
+ .init(cpu->numThreads)
+ .name(name() + ".committedOps")
+ .desc("Number of ops (including micro ops) committed")
+ .flags(total)
+ ;
+
statComSwp
.init(cpu->numThreads)
.name(name() + ".swp_count")
@@ -988,12 +999,14 @@ DefaultCommit<Impl>::commitInsts()
// Set the doneSeqNum to the youngest committed instruction.
toIEW->commitInfo[tid].doneSeqNum = head_inst->seqNum;
- ++commitCommittedInsts;
+ 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);
+ cpu->instDone(tid, head_inst);
}
if (tid == 0) {
@@ -1175,7 +1188,7 @@ DefaultCommit<Impl>::commitHead(DynInstPtr &head_inst, unsigned inst_num)
if (head_inst->traceData) {
if (DTRACE(ExecFaulting)) {
head_inst->traceData->setFetchSeq(head_inst->seqNum);
- head_inst->traceData->setCPSeq(thread[tid]->numInst);
+ head_inst->traceData->setCPSeq(thread[tid]->numOp);
head_inst->traceData->dump();
}
delete head_inst->traceData;
@@ -1209,7 +1222,7 @@ DefaultCommit<Impl>::commitHead(DynInstPtr &head_inst, unsigned inst_num)
head_inst->seqNum, head_inst->pcState());
if (head_inst->traceData) {
head_inst->traceData->setFetchSeq(head_inst->seqNum);
- head_inst->traceData->setCPSeq(thread[tid]->numInst);
+ head_inst->traceData->setCPSeq(thread[tid]->numOp);
head_inst->traceData->dump();
delete head_inst->traceData;
head_inst->traceData = NULL;
@@ -1360,10 +1373,14 @@ DefaultCommit<Impl>::updateComInstStats(DynInstPtr &inst)
if (inst->isDataPrefetch()) {
statComSwp[tid]++;
} else {
- statComInst[tid]++;
+ if (!inst->isMicroop() || inst->isLastMicroop())
+ instsCommitted[tid]++;
+ opsCommitted[tid]++;
}
#else
- statComInst[tid]++;
+ if (!inst->isMicroop() || inst->isLastMicroop())
+ instsCommitted[tid]++;
+ opsCommitted[tid]++;
#endif
//