summaryrefslogtreecommitdiff
path: root/src/sim
diff options
context:
space:
mode:
authorSteve Reinhardt <stever@eecs.umich.edu>2006-10-21 23:32:14 -0700
committerSteve Reinhardt <stever@eecs.umich.edu>2006-10-21 23:32:14 -0700
commit0159529343f31cc4a4496d5b5c2939f8e2e0bb95 (patch)
tree29ffc452a11d430ec7f1e09d59f8a5f5cce28502 /src/sim
parent883ed108e443e7f9ea53fa13867a8ddf0ea9aea0 (diff)
downloadgem5-0159529343f31cc4a4496d5b5c2939f8e2e0bb95.tar.xz
Add Quiesce trace flag to track CPU quiesce/wakeup events.
--HG-- extra : convert_revision : 23be99d0fe6e2184523efe5d9e0a1ac7bf19d087
Diffstat (limited to 'src/sim')
-rw-r--r--src/sim/pseudo_inst.cc20
1 files changed, 14 insertions, 6 deletions
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())