Add Quiesce trace flag to track CPU quiesce/wakeup events.
--HG-- extra : convert_revision : 23be99d0fe6e2184523efe5d9e0a1ac7bf19d087
This commit is contained in:
parent
883ed108e4
commit
0159529343
3 changed files with 17 additions and 6 deletions
|
@ -133,6 +133,7 @@ baseFlags = [
|
||||||
'PciConfigAll',
|
'PciConfigAll',
|
||||||
'Pipeline',
|
'Pipeline',
|
||||||
'Printf',
|
'Printf',
|
||||||
|
'Quiesce',
|
||||||
'ROB',
|
'ROB',
|
||||||
'Regs',
|
'Regs',
|
||||||
'Rename',
|
'Rename',
|
||||||
|
|
|
@ -28,6 +28,7 @@
|
||||||
* Authors: Kevin Lim
|
* Authors: Kevin Lim
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "cpu/base.hh"
|
||||||
#include "cpu/thread_context.hh"
|
#include "cpu/thread_context.hh"
|
||||||
#include "cpu/quiesce_event.hh"
|
#include "cpu/quiesce_event.hh"
|
||||||
|
|
||||||
|
@ -39,6 +40,7 @@ EndQuiesceEvent::EndQuiesceEvent(ThreadContext *_tc)
|
||||||
void
|
void
|
||||||
EndQuiesceEvent::process()
|
EndQuiesceEvent::process()
|
||||||
{
|
{
|
||||||
|
DPRINTF(Quiesce, "activating %s\n", tc->getCpuPtr()->name());
|
||||||
tc->activate();
|
tc->activate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -87,10 +87,15 @@ namespace AlphaPseudo
|
||||||
|
|
||||||
EndQuiesceEvent *quiesceEvent = tc->getQuiesceEvent();
|
EndQuiesceEvent *quiesceEvent = tc->getQuiesceEvent();
|
||||||
|
|
||||||
|
Tick resume = curTick + Clock::Int::ns * ns;
|
||||||
|
|
||||||
if (quiesceEvent->scheduled())
|
if (quiesceEvent->scheduled())
|
||||||
quiesceEvent->reschedule(curTick + Clock::Int::ns * ns);
|
quiesceEvent->reschedule(resume);
|
||||||
else
|
else
|
||||||
quiesceEvent->schedule(curTick + Clock::Int::ns * ns);
|
quiesceEvent->schedule(resume);
|
||||||
|
|
||||||
|
DPRINTF(Quiesce, "%s: quiesceNs(%d) until %d\n",
|
||||||
|
tc->getCpuPtr()->name(), ns, resume);
|
||||||
|
|
||||||
tc->suspend();
|
tc->suspend();
|
||||||
if (tc->getKernelStats())
|
if (tc->getKernelStats())
|
||||||
|
@ -105,12 +110,15 @@ namespace AlphaPseudo
|
||||||
|
|
||||||
EndQuiesceEvent *quiesceEvent = tc->getQuiesceEvent();
|
EndQuiesceEvent *quiesceEvent = tc->getQuiesceEvent();
|
||||||
|
|
||||||
|
Tick resume = curTick + tc->getCpuPtr()->cycles(cycles);
|
||||||
|
|
||||||
if (quiesceEvent->scheduled())
|
if (quiesceEvent->scheduled())
|
||||||
quiesceEvent->reschedule(curTick +
|
quiesceEvent->reschedule(resume);
|
||||||
tc->getCpuPtr()->cycles(cycles));
|
|
||||||
else
|
else
|
||||||
quiesceEvent->schedule(curTick +
|
quiesceEvent->schedule(resume);
|
||||||
tc->getCpuPtr()->cycles(cycles));
|
|
||||||
|
DPRINTF(Quiesce, "%s: quiesceCycles(%d) until %d\n",
|
||||||
|
tc->getCpuPtr()->name(), cycles, resume);
|
||||||
|
|
||||||
tc->suspend();
|
tc->suspend();
|
||||||
if (tc->getKernelStats())
|
if (tc->getKernelStats())
|
||||||
|
|
Loading…
Reference in a new issue