Sampling fixes related to the quiesce event.
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
This commit is contained in:
@@ -159,6 +159,16 @@ CPUExecContext::takeOverFrom(ExecContext *oldContext)
|
||||
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);
|
||||
|
||||
@@ -135,9 +135,9 @@ class CPUExecContext
|
||||
Addr profilePC;
|
||||
void dumpFuncProfile();
|
||||
|
||||
Event *quiesceEvent;
|
||||
EndQuiesceEvent *quiesceEvent;
|
||||
|
||||
Event *getQuiesceEvent() { return quiesceEvent; }
|
||||
EndQuiesceEvent *getQuiesceEvent() { return quiesceEvent; }
|
||||
|
||||
Tick readLastActivate() { return lastActivate; }
|
||||
|
||||
|
||||
@@ -42,6 +42,7 @@
|
||||
class AlphaDTB;
|
||||
class AlphaITB;
|
||||
class BaseCPU;
|
||||
class EndQuiesceEvent;
|
||||
class Event;
|
||||
class FunctionalMemory;
|
||||
class PhysicalMemory;
|
||||
@@ -130,7 +131,7 @@ class ExecContext
|
||||
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
|
||||
@@ -277,7 +278,7 @@ class ProxyExecContext : public ExecContext
|
||||
{ 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(); }
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
#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"
|
||||
@@ -83,7 +84,7 @@ namespace AlphaPseudo
|
||||
if (!doQuiesce || ns == 0)
|
||||
return;
|
||||
|
||||
Event *quiesceEvent = xc->getQuiesceEvent();
|
||||
EndQuiesceEvent *quiesceEvent = xc->getQuiesceEvent();
|
||||
|
||||
if (quiesceEvent->scheduled())
|
||||
quiesceEvent->reschedule(curTick + Clock::Int::ns * ns);
|
||||
@@ -100,7 +101,7 @@ namespace AlphaPseudo
|
||||
if (!doQuiesce || cycles == 0)
|
||||
return;
|
||||
|
||||
Event *quiesceEvent = xc->getQuiesceEvent();
|
||||
EndQuiesceEvent *quiesceEvent = xc->getQuiesceEvent();
|
||||
|
||||
if (quiesceEvent->scheduled())
|
||||
quiesceEvent->reschedule(curTick +
|
||||
|
||||
Reference in New Issue
Block a user