From e056e49c4562108eeb7abbbeb1ee8acb096fe363 Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Sun, 26 Aug 2007 20:25:42 -0700 Subject: Simple CPU: Make sure only instructions which complete without faulting are counted. --HG-- extra : convert_revision : 01019c7129ed762d8826c3e6519989aa3fc3b5fd --- src/cpu/simple/base.hh | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/cpu/simple/base.hh') diff --git a/src/cpu/simple/base.hh b/src/cpu/simple/base.hh index 843fd025c..2bc329b68 100644 --- a/src/cpu/simple/base.hh +++ b/src/cpu/simple/base.hh @@ -157,6 +157,14 @@ class BaseSimpleCPU : public BaseCPU Counter startNumInst; Stats::Scalar<> numInsts; + void countInst() + { + numInst++; + numInsts++; + + thread->funcExeInst++; + } + virtual Counter totalInstructions() const { return numInst - startNumInst; -- cgit v1.2.3