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
This commit is contained in:
parent
6a2d6c0f83
commit
d95b23b81f
1 changed files with 9 additions and 0 deletions
|
@ -455,13 +455,16 @@ FullO3CPU<Impl>::tick()
|
||||||
if (!tickEvent.scheduled()) {
|
if (!tickEvent.scheduled()) {
|
||||||
if (_status == SwitchedOut ||
|
if (_status == SwitchedOut ||
|
||||||
getState() == SimObject::Drained) {
|
getState() == SimObject::Drained) {
|
||||||
|
DPRINTF(O3CPU, "Switched out!\n");
|
||||||
// increment stat
|
// increment stat
|
||||||
lastRunningCycle = curTick;
|
lastRunningCycle = curTick;
|
||||||
} else if (!activityRec.active() || _status == Idle) {
|
} else if (!activityRec.active() || _status == Idle) {
|
||||||
|
DPRINTF(O3CPU, "Idle!\n");
|
||||||
lastRunningCycle = curTick;
|
lastRunningCycle = curTick;
|
||||||
timesIdled++;
|
timesIdled++;
|
||||||
} else {
|
} else {
|
||||||
tickEvent.schedule(curTick + cycles(1));
|
tickEvent.schedule(curTick + cycles(1));
|
||||||
|
DPRINTF(O3CPU, "Scheduling next tick!\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -520,6 +523,8 @@ FullO3CPU<Impl>::activateThread(unsigned tid)
|
||||||
list<unsigned>::iterator isActive = find(
|
list<unsigned>::iterator isActive = find(
|
||||||
activeThreads.begin(), activeThreads.end(), tid);
|
activeThreads.begin(), activeThreads.end(), tid);
|
||||||
|
|
||||||
|
DPRINTF(O3CPU, "[tid:%i]: Calling activate thread.\n", tid);
|
||||||
|
|
||||||
if (isActive == activeThreads.end()) {
|
if (isActive == activeThreads.end()) {
|
||||||
DPRINTF(O3CPU, "[tid:%i]: Adding to active threads list\n",
|
DPRINTF(O3CPU, "[tid:%i]: Adding to active threads list\n",
|
||||||
tid);
|
tid);
|
||||||
|
@ -536,6 +541,8 @@ FullO3CPU<Impl>::deactivateThread(unsigned tid)
|
||||||
list<unsigned>::iterator thread_it =
|
list<unsigned>::iterator thread_it =
|
||||||
find(activeThreads.begin(), activeThreads.end(), tid);
|
find(activeThreads.begin(), activeThreads.end(), tid);
|
||||||
|
|
||||||
|
DPRINTF(O3CPU, "[tid:%i]: Calling deactivate thread.\n", tid);
|
||||||
|
|
||||||
if (thread_it != activeThreads.end()) {
|
if (thread_it != activeThreads.end()) {
|
||||||
DPRINTF(O3CPU,"[tid:%i]: Removing from active threads list\n",
|
DPRINTF(O3CPU,"[tid:%i]: Removing from active threads list\n",
|
||||||
tid);
|
tid);
|
||||||
|
@ -836,7 +843,9 @@ template <class Impl>
|
||||||
void
|
void
|
||||||
FullO3CPU<Impl>::resume()
|
FullO3CPU<Impl>::resume()
|
||||||
{
|
{
|
||||||
|
#if FULL_SYSTEM
|
||||||
assert(system->getMemoryMode() == System::Timing);
|
assert(system->getMemoryMode() == System::Timing);
|
||||||
|
#endif
|
||||||
fetch.resume();
|
fetch.resume();
|
||||||
decode.resume();
|
decode.resume();
|
||||||
rename.resume();
|
rename.resume();
|
||||||
|
|
Loading…
Reference in a new issue