summaryrefslogtreecommitdiff
path: root/src/cpu/simple/base.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/cpu/simple/base.hh')
-rw-r--r--src/cpu/simple/base.hh19
1 files changed, 16 insertions, 3 deletions
diff --git a/src/cpu/simple/base.hh b/src/cpu/simple/base.hh
index 55dec5d53..4c02e2eb0 100644
--- a/src/cpu/simple/base.hh
+++ b/src/cpu/simple/base.hh
@@ -189,20 +189,33 @@ class BaseSimpleCPU : public BaseCPU
Counter numInst;
Counter startNumInst;
Stats::Scalar numInsts;
+ Counter numOp;
+ Counter startNumOp;
+ Stats::Scalar numOps;
void countInst()
{
- numInst++;
- numInsts++;
+ if (!curStaticInst->isMicroop() || curStaticInst->isLastMicroop()) {
+ numInst++;
+ numInsts++;
+ }
+ numOp++;
+ numOps++;
+
system->totalNumInsts++;
thread->funcExeInst++;
}
- virtual Counter totalInstructions() const
+ virtual Counter totalInsts() const
{
return numInst - startNumInst;
}
+ virtual Counter totalOps() const
+ {
+ return numOp - startNumOp;
+ }
+
//number of integer alu accesses
Stats::Scalar numIntAluAccesses;