diff options
author | Anthony Gutierrez <atgutier@umich.edu> | 2012-02-12 16:07:39 -0600 |
---|---|---|
committer | Anthony Gutierrez <atgutier@umich.edu> | 2012-02-12 16:07:39 -0600 |
commit | 542d0ceebca1d24bfb433ce9fe916b0586f8d029 (patch) | |
tree | 45afbefa2ec6a79de564d2c4505667a4d974e1f5 /src/cpu/simple/base.hh | |
parent | 230540e655efd09ad057e7fde2ac257f355c06d1 (diff) | |
download | gem5-542d0ceebca1d24bfb433ce9fe916b0586f8d029.tar.xz |
cpu: add separate stats for insts/ops both globally and per cpu model
Diffstat (limited to 'src/cpu/simple/base.hh')
-rw-r--r-- | src/cpu/simple/base.hh | 19 |
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; |