summaryrefslogtreecommitdiff
path: root/src/cpu/base.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/cpu/base.cc')
-rw-r--r--src/cpu/base.cc11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/cpu/base.cc b/src/cpu/base.cc
index b761e714e..4d8b09ed2 100644
--- a/src/cpu/base.cc
+++ b/src/cpu/base.cc
@@ -94,6 +94,14 @@ void
CPUProgressEvent::process()
{
Counter temp = cpu->totalOps();
+
+ if (_repeatEvent)
+ cpu->schedule(this, curTick() + _interval);
+
+ if(cpu->switchedOut()) {
+ return;
+ }
+
#ifndef NDEBUG
double ipc = double(temp - lastNumInst) / (_interval / cpu->clockPeriod());
@@ -107,9 +115,6 @@ CPUProgressEvent::process()
temp - lastNumInst);
#endif
lastNumInst = temp;
-
- if (_repeatEvent)
- cpu->schedule(this, curTick() + _interval);
}
const char *