diff -r e895db06e69f -r d0db3e1dab40 src/cpu/ozone/cpu_impl.hh --- a/src/cpu/ozone/cpu_impl.hh Mon Jul 15 18:08:57 2013 -0400 +++ b/src/cpu/ozone/cpu_impl.hh Wed Aug 07 15:48:03 2013 -0500 @@ -282,7 +282,7 @@ assert(thread_num == 0); assert(_status == Idle); - notIdleFraction++; + notIdleFraction = 1; scheduleTickEvent(delay); _status = Running; if (thread.quiesceEvent && thread.quiesceEvent->scheduled()) @@ -300,7 +300,7 @@ // @todo: Figure out how to initially set the status properly so // this is running. // assert(_status == Running); - notIdleFraction--; + notIdleFraction = 0; unscheduleTickEvent(); _status = Idle; } diff -r e895db06e69f -r d0db3e1dab40 src/cpu/simple/atomic.cc --- a/src/cpu/simple/atomic.cc Mon Jul 15 18:08:57 2013 -0400 +++ b/src/cpu/simple/atomic.cc Wed Aug 07 15:48:03 2013 -0500 @@ -175,8 +175,10 @@ if (thread->status() == ThreadContext::Active) { schedule(tickEvent, nextCycle()); _status = BaseSimpleCPU::Running; + notIdleFraction = 1; } else { _status = BaseSimpleCPU::Idle; + notIdleFraction = 0; } system->totalNumInsts = 0; @@ -244,7 +246,7 @@ assert(_status == Idle); assert(!tickEvent.scheduled()); - notIdleFraction++; + notIdleFraction = 1; numCycles += ticksToCycles(thread->lastActivate - thread->lastSuspend); //Make sure ticks are still on multiples of cycles @@ -271,7 +273,7 @@ if (tickEvent.scheduled()) deschedule(tickEvent); - notIdleFraction--; + notIdleFraction = 0; _status = Idle; } diff -r e895db06e69f -r d0db3e1dab40 src/cpu/simple/timing.cc --- a/src/cpu/simple/timing.cc Mon Jul 15 18:08:57 2013 -0400 +++ b/src/cpu/simple/timing.cc Wed Aug 07 15:48:03 2013 -0500 @@ -144,8 +144,10 @@ if (thread->status() == ThreadContext::Active) { schedule(fetchEvent, nextCycle()); _status = BaseSimpleCPU::Running; + notIdleFraction = 1; } else { _status = BaseSimpleCPU::Idle; + notIdleFraction = 0; } } @@ -207,7 +209,7 @@ assert(_status == Idle); - notIdleFraction++; + notIdleFraction = 1; _status = BaseSimpleCPU::Running; // kick things off by initiating the fetch of the next instruction @@ -231,7 +233,7 @@ // just change status to Idle... if status != Running, // completeInst() will not initiate fetch of next instruction. - notIdleFraction--; + notIdleFraction = 0; _status = Idle; }