From: Kevin Lim Date: Wed, 3 May 2006 19:54:36 +0000 (-0400) Subject: Fixes for the sampler. X-Git-Tag: m5_2.0_beta1~36^2~108^2~36 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4601230d35de7bbda5906d04a28e2387f0e5177b;p=gem5.git Fixes for the sampler. cpu/simple/cpu.cc: Sampler fixes. The status may be switched out when calling activate or suspend if there is a switchover during a quiesce. --HG-- extra : convert_revision : da026e75dfb86289484cf01c5b1ecd9b03a72bd3 --- diff --git a/cpu/simple/cpu.cc b/cpu/simple/cpu.cc index 8db72b77e..07f9d0dad 100644 --- a/cpu/simple/cpu.cc +++ b/cpu/simple/cpu.cc @@ -144,6 +144,7 @@ SimpleCPU::SimpleCPU(Params *p) cpuXC = new CPUExecContext(this, /* thread_num */ 0, p->process, /* asid */ 0); #endif // !FULL_SYSTEM + cpuXC->setStatus(ExecContext::Suspended); xcProxy = cpuXC->getProxy(); icacheInterface = p->icache_interface; @@ -212,7 +213,7 @@ SimpleCPU::activateContext(int thread_num, int delay) assert(thread_num == 0); assert(cpuXC); - assert(_status == Idle); + assert(_status == Idle || _status == SwitchedOut); notIdleFraction++; scheduleTickEvent(delay); _status = Running; @@ -225,7 +226,7 @@ SimpleCPU::suspendContext(int thread_num) assert(thread_num == 0); assert(cpuXC); - assert(_status == Running); + assert(_status == Running || _status == SwitchedOut); notIdleFraction--; unscheduleTickEvent(); _status = Idle; @@ -418,7 +419,7 @@ SimpleCPU::read(Addr addr, T &data, unsigned flags) Fault fault = cpuXC->read(memReq,data); if (traceData) { - traceData->setAddr(addr); + traceData->setAddr(memReq->vaddr); } return fault; }