cpu/cpu_exec_context.cc:
cpu/cpu_exec_context.hh:
Sampling fixes. The CPU models may switch during a quiesce period, so it needs to be sure to wake up the right XC.
cpu/exec_context.hh:
Return the EndQuiesceEvent specifically.
sim/pseudo_inst.cc:
Return the EndQuiesceEvent specifically for sampling.
--HG--
extra : convert_revision :
f9aa1fc8d4db8058f05319cb6a3d4605ce93b4c8
func_exe_inst = oldContext->readFuncExeInst();
#endif
+ EndQuiesceEvent *quiesce = oldContext->getQuiesceEvent();
+ if (quiesce) {
+ // Point the quiesce event's XC at this XC so that it wakes up
+ // the proper CPU.
+ quiesce->xc = proxy;
+ }
+ if (quiesceEvent) {
+ quiesceEvent->xc = proxy;
+ }
+
storeCondFailures = 0;
oldContext->setStatus(ExecContext::Unallocated);
Addr profilePC;
void dumpFuncProfile();
- Event *quiesceEvent;
+ EndQuiesceEvent *quiesceEvent;
- Event *getQuiesceEvent() { return quiesceEvent; }
+ EndQuiesceEvent *getQuiesceEvent() { return quiesceEvent; }
Tick readLastActivate() { return lastActivate; }
class AlphaDTB;
class AlphaITB;
class BaseCPU;
+class EndQuiesceEvent;
class Event;
class FunctionalMemory;
class PhysicalMemory;
virtual void unserialize(Checkpoint *cp, const std::string §ion) = 0;
#if FULL_SYSTEM
- virtual Event *getQuiesceEvent() = 0;
+ virtual EndQuiesceEvent *getQuiesceEvent() = 0;
// Not necessarily the best location for these...
// Having an extra function just to read these is obnoxious
{ actualXC->unserialize(cp, section); }
#if FULL_SYSTEM
- Event *getQuiesceEvent() { return actualXC->getQuiesceEvent(); }
+ EndQuiesceEvent *getQuiesceEvent() { return actualXC->getQuiesceEvent(); }
Tick readLastActivate() { return actualXC->readLastActivate(); }
Tick readLastSuspend() { return actualXC->readLastSuspend(); }
#include "cpu/base.hh"
#include "cpu/sampler/sampler.hh"
#include "cpu/exec_context.hh"
+#include "cpu/quiesce_event.hh"
#include "kern/kernel_stats.hh"
#include "sim/param.hh"
#include "sim/serialize.hh"
if (!doQuiesce || ns == 0)
return;
- Event *quiesceEvent = xc->getQuiesceEvent();
+ EndQuiesceEvent *quiesceEvent = xc->getQuiesceEvent();
if (quiesceEvent->scheduled())
quiesceEvent->reschedule(curTick + Clock::Int::ns * ns);
if (!doQuiesce || cycles == 0)
return;
- Event *quiesceEvent = xc->getQuiesceEvent();
+ EndQuiesceEvent *quiesceEvent = xc->getQuiesceEvent();
if (quiesceEvent->scheduled())
quiesceEvent->reschedule(curTick +