cpu: commit probe notification on every microop or macroop
authorNikos Nikoleris <nikos.nikoleris@gmail.com>
Tue, 20 Jan 2015 20:15:27 +0000 (14:15 -0600)
committerNikos Nikoleris <nikos.nikoleris@gmail.com>
Tue, 20 Jan 2015 20:15:27 +0000 (14:15 -0600)
The ppCommit should notify the attached listener every time the cpu commits
a microop or non microcoded insturction. The listener can then decide
whether it will process only the last microop (eg. SimPoint probe).

Committed by: Nilay Vaish <nilay@cs.wisc.edu>

src/cpu/simple/atomic.cc
src/cpu/simple/probes/simpoint.cc

index aeaebcdb848330db63a236e7dd450e472b7a02b4..d1298e3cc041873655220d78c54e5f6da9cf1ea3 100644 (file)
@@ -580,10 +580,7 @@ AtomicSimpleCPU::tick()
                 // keep an instruction count
                 if (fault == NoFault) {
                     countInst();
-                    if (!curStaticInst->isMicroop() ||
-                         curStaticInst->isLastMicroop()) {
-                        ppCommit->notify(std::make_pair(thread, curStaticInst));
-                    }
+                    ppCommit->notify(std::make_pair(thread, curStaticInst));
                 }
                 else if (traceData && !DTRACE(ExecFaulting)) {
                     delete traceData;
index f2c0be62bb7df2afa41750084cd71e4a02bca5c4..2de3cd4205b1c04fe708b1441b5b152f06ef28a8 100644 (file)
@@ -79,6 +79,9 @@ SimPoint::profile(const std::pair<SimpleThread*, StaticInstPtr>& p)
     SimpleThread* thread = p.first;
     const StaticInstPtr &inst = p.second;
 
+    if (inst->isMicroop() && !inst->isLastMicroop())
+        return;
+
     if (!currentBBVInstCount)
         currentBBV.first = thread->pcState().instAddr();