summaryrefslogtreecommitdiff
path: root/src/cpu/simple/atomic.cc
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2007-08-26 20:25:42 -0700
committerGabe Black <gblack@eecs.umich.edu>2007-08-26 20:25:42 -0700
commite056e49c4562108eeb7abbbeb1ee8acb096fe363 (patch)
tree162b440d59f688da34667ecf1add53bb4d52baf7 /src/cpu/simple/atomic.cc
parent537239b278f7b8171d2eb09ef7f99c332266c48f (diff)
downloadgem5-e056e49c4562108eeb7abbbeb1ee8acb096fe363.tar.xz
Simple CPU: Make sure only instructions which complete without faulting are counted.
--HG-- extra : convert_revision : 01019c7129ed762d8826c3e6519989aa3fc3b5fd
Diffstat (limited to 'src/cpu/simple/atomic.cc')
-rw-r--r--src/cpu/simple/atomic.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/cpu/simple/atomic.cc b/src/cpu/simple/atomic.cc
index 379c50b51..86deb84e6 100644
--- a/src/cpu/simple/atomic.cc
+++ b/src/cpu/simple/atomic.cc
@@ -546,6 +546,11 @@ AtomicSimpleCPU::tick()
if(curStaticInst)
{
fault = curStaticInst->execute(this, traceData);
+
+ // keep an instruction count
+ if (fault == NoFault)
+ countInst();
+
postExecute();
}