diff options
Diffstat (limited to 'src/sim/pseudo_inst.cc')
-rw-r--r-- | src/sim/pseudo_inst.cc | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/src/sim/pseudo_inst.cc b/src/sim/pseudo_inst.cc index d9064bf73..8ad298454 100644 --- a/src/sim/pseudo_inst.cc +++ b/src/sim/pseudo_inst.cc @@ -39,6 +39,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" @@ -65,7 +66,8 @@ namespace AlphaPseudo void arm(ExecContext *xc) { - xc->getCpuPtr()->kernelStats->arm(); + if (xc->getKernelStats()) + xc->getKernelStats()->arm(); } void @@ -75,7 +77,8 @@ namespace AlphaPseudo return; xc->suspend(); - xc->getCpuPtr()->kernelStats->quiesce(); + if (xc->getKernelStats()) + xc->getKernelStats()->quiesce(); } void @@ -84,7 +87,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); @@ -92,7 +95,8 @@ namespace AlphaPseudo quiesceEvent->schedule(curTick + Clock::Int::ns * ns); xc->suspend(); - xc->getCpuPtr()->kernelStats->quiesce(); + if (xc->getKernelStats()) + xc->getKernelStats()->quiesce(); } void @@ -101,7 +105,7 @@ namespace AlphaPseudo if (!doQuiesce || cycles == 0) return; - Event *quiesceEvent = xc->getQuiesceEvent(); + EndQuiesceEvent *quiesceEvent = xc->getQuiesceEvent(); if (quiesceEvent->scheduled()) quiesceEvent->reschedule(curTick + @@ -111,7 +115,8 @@ namespace AlphaPseudo xc->getCpuPtr()->cycles(cycles)); xc->suspend(); - xc->getCpuPtr()->kernelStats->quiesce(); + if (xc->getKernelStats()) + xc->getKernelStats()->quiesce(); } uint64_t @@ -123,7 +128,8 @@ namespace AlphaPseudo void ivlb(ExecContext *xc) { - xc->getCpuPtr()->kernelStats->ivlb(); + if (xc->getKernelStats()) + xc->getKernelStats()->ivlb(); } void |