From: Kevin Lim Date: Mon, 9 Oct 2006 15:01:19 +0000 (-0400) Subject: Fix outstanding bug (FS#158). X-Git-Tag: m5_2.0_beta2~104^2~28 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d95b23b81f3bf5365fba529952a17cffdbcf934a;p=gem5.git Fix outstanding bug (FS#158). src/cpu/o3/cpu.cc: Extra debugging, fix a bug brought up on bug tracker. --HG-- extra : convert_revision : 23f8b166ba0d0af54e15b651ed28f59a1bc9d2f2 --- diff --git a/src/cpu/o3/cpu.cc b/src/cpu/o3/cpu.cc index 787ae2d14..fc65c5d99 100644 --- a/src/cpu/o3/cpu.cc +++ b/src/cpu/o3/cpu.cc @@ -455,13 +455,16 @@ FullO3CPU::tick() if (!tickEvent.scheduled()) { if (_status == SwitchedOut || getState() == SimObject::Drained) { + DPRINTF(O3CPU, "Switched out!\n"); // increment stat lastRunningCycle = curTick; } else if (!activityRec.active() || _status == Idle) { + DPRINTF(O3CPU, "Idle!\n"); lastRunningCycle = curTick; timesIdled++; } else { tickEvent.schedule(curTick + cycles(1)); + DPRINTF(O3CPU, "Scheduling next tick!\n"); } } @@ -520,6 +523,8 @@ FullO3CPU::activateThread(unsigned tid) list::iterator isActive = find( activeThreads.begin(), activeThreads.end(), tid); + DPRINTF(O3CPU, "[tid:%i]: Calling activate thread.\n", tid); + if (isActive == activeThreads.end()) { DPRINTF(O3CPU, "[tid:%i]: Adding to active threads list\n", tid); @@ -536,6 +541,8 @@ FullO3CPU::deactivateThread(unsigned tid) list::iterator thread_it = find(activeThreads.begin(), activeThreads.end(), tid); + DPRINTF(O3CPU, "[tid:%i]: Calling deactivate thread.\n", tid); + if (thread_it != activeThreads.end()) { DPRINTF(O3CPU,"[tid:%i]: Removing from active threads list\n", tid); @@ -836,7 +843,9 @@ template void FullO3CPU::resume() { +#if FULL_SYSTEM assert(system->getMemoryMode() == System::Timing); +#endif fetch.resume(); decode.resume(); rename.resume();