cpu: Correctly account for executed instructions in simple cpus
authorNikos Nikoleris <nikos.nikoleris@arm.com>
Thu, 28 Feb 2019 17:55:41 +0000 (17:55 +0000)
committerNikos Nikoleris <nikos.nikoleris@arm.com>
Fri, 5 Apr 2019 21:52:19 +0000 (21:52 +0000)
Change-Id: I53f34b2d9db6e4d2e03dde42a970764bb2a5e701
Signed-off-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/17730
Reviewed-by: Anthony Gutierrez <anthony.gutierrez@amd.com>
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>

src/cpu/simple/base.cc

index b243dcca30bb94de39cc0dd970bf7a59cd22db12..49bc1ad73e6d39ce3a8c390b2cfc262b007235ff 100644 (file)
@@ -175,12 +175,12 @@ BaseSimpleCPU::countInst()
     if (!curStaticInst->isMicroop() || curStaticInst->isLastMicroop()) {
         t_info.numInst++;
         t_info.numInsts++;
+
+        system->totalNumInsts++;
+        t_info.thread->funcExeInst++;
     }
     t_info.numOp++;
     t_info.numOps++;
-
-    system->totalNumInsts++;
-    t_info.thread->funcExeInst++;
 }
 
 Counter