summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/base/traceflags.py1
-rw-r--r--src/cpu/quiesce_event.cc2
-rw-r--r--src/sim/pseudo_inst.cc20
3 files changed, 17 insertions, 6 deletions
diff --git a/src/base/traceflags.py b/src/base/traceflags.py
index 298d22c2b..2402cf361 100644
--- a/src/base/traceflags.py
+++ b/src/base/traceflags.py
@@ -133,6 +133,7 @@ baseFlags = [
'PciConfigAll',
'Pipeline',
'Printf',
+ 'Quiesce',
'ROB',
'Regs',
'Rename',
diff --git a/src/cpu/quiesce_event.cc b/src/cpu/quiesce_event.cc
index 8dd20db02..fa79e6d1e 100644
--- a/src/cpu/quiesce_event.cc
+++ b/src/cpu/quiesce_event.cc
@@ -28,6 +28,7 @@
* Authors: Kevin Lim
*/
+#include "cpu/base.hh"
#include "cpu/thread_context.hh"
#include "cpu/quiesce_event.hh"
@@ -39,6 +40,7 @@ EndQuiesceEvent::EndQuiesceEvent(ThreadContext *_tc)
void
EndQuiesceEvent::process()
{
+ DPRINTF(Quiesce, "activating %s\n", tc->getCpuPtr()->name());
tc->activate();
}
diff --git a/src/sim/pseudo_inst.cc b/src/sim/pseudo_inst.cc
index addf897c6..4eb0866a5 100644
--- a/src/sim/pseudo_inst.cc
+++ b/src/sim/pseudo_inst.cc
@@ -87,10 +87,15 @@ namespace AlphaPseudo
EndQuiesceEvent *quiesceEvent = tc->getQuiesceEvent();
+ Tick resume = curTick + Clock::Int::ns * ns;
+
if (quiesceEvent->scheduled())
- quiesceEvent->reschedule(curTick + Clock::Int::ns * ns);
+ quiesceEvent->reschedule(resume);
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();
if (tc->getKernelStats())
@@ -105,12 +110,15 @@ namespace AlphaPseudo
EndQuiesceEvent *quiesceEvent = tc->getQuiesceEvent();
+ Tick resume = curTick + tc->getCpuPtr()->cycles(cycles);
+
if (quiesceEvent->scheduled())
- quiesceEvent->reschedule(curTick +
- tc->getCpuPtr()->cycles(cycles));
+ quiesceEvent->reschedule(resume);
else
- quiesceEvent->schedule(curTick +
- tc->getCpuPtr()->cycles(cycles));
+ quiesceEvent->schedule(resume);
+
+ DPRINTF(Quiesce, "%s: quiesceCycles(%d) until %d\n",
+ tc->getCpuPtr()->name(), cycles, resume);
tc->suspend();
if (tc->getKernelStats())