From d2a4f595d6e70f5f9f5c7cae4f496c2db1e39ca5 Mon Sep 17 00:00:00 2001 From: Ali Saidi Date: Fri, 28 Sep 2007 13:22:14 -0400 Subject: Update stats for quiesced cycles --HG-- extra : convert_revision : 703ba58f156c9f2677b020f05d36bc1e3ae0b9e5 --- src/cpu/simple/atomic.cc | 1 + src/cpu/simple/timing.cc | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'src/cpu/simple') diff --git a/src/cpu/simple/atomic.cc b/src/cpu/simple/atomic.cc index 9187fa7c7..525bcbd22 100644 --- a/src/cpu/simple/atomic.cc +++ b/src/cpu/simple/atomic.cc @@ -252,6 +252,7 @@ AtomicSimpleCPU::activateContext(int thread_num, int delay) assert(!tickEvent.scheduled()); notIdleFraction++; + numCycles += tickToCycles(thread->lastActivate - thread->lastSuspend); //Make sure ticks are still on multiples of cycles tickEvent.schedule(nextCycle(curTick + ticks(delay))); diff --git a/src/cpu/simple/timing.cc b/src/cpu/simple/timing.cc index 2b5577e04..b70fc2a41 100644 --- a/src/cpu/simple/timing.cc +++ b/src/cpu/simple/timing.cc @@ -172,7 +172,6 @@ TimingSimpleCPU::resume() } changeState(SimObject::Running); - previousTick = curTick; } void @@ -207,6 +206,7 @@ TimingSimpleCPU::takeOverFrom(BaseCPU *oldCPU) if (_status != Running) { _status = Idle; } + previousTick = curTick; } -- cgit v1.2.3