summaryrefslogtreecommitdiff
path: root/src/sim/pseudo_inst.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/sim/pseudo_inst.cc')
-rw-r--r--src/sim/pseudo_inst.cc20
1 files changed, 13 insertions, 7 deletions
diff --git a/src/sim/pseudo_inst.cc b/src/sim/pseudo_inst.cc
index 7897b5c8b..12c076c08 100644
--- a/src/sim/pseudo_inst.cc
+++ b/src/sim/pseudo_inst.cc
@@ -37,6 +37,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"
@@ -63,7 +64,8 @@ namespace AlphaPseudo
void
arm(ExecContext *xc)
{
- xc->getCpuPtr()->kernelStats->arm();
+ if (xc->getKernelStats())
+ xc->getKernelStats()->arm();
}
void
@@ -73,7 +75,8 @@ namespace AlphaPseudo
return;
xc->suspend();
- xc->getCpuPtr()->kernelStats->quiesce();
+ if (xc->getKernelStats())
+ xc->getKernelStats()->quiesce();
}
void
@@ -82,7 +85,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);
@@ -90,7 +93,8 @@ namespace AlphaPseudo
quiesceEvent->schedule(curTick + Clock::Int::ns * ns);
xc->suspend();
- xc->getCpuPtr()->kernelStats->quiesce();
+ if (xc->getKernelStats())
+ xc->getKernelStats()->quiesce();
}
void
@@ -99,7 +103,7 @@ namespace AlphaPseudo
if (!doQuiesce || cycles == 0)
return;
- Event *quiesceEvent = xc->getQuiesceEvent();
+ EndQuiesceEvent *quiesceEvent = xc->getQuiesceEvent();
if (quiesceEvent->scheduled())
quiesceEvent->reschedule(curTick +
@@ -109,7 +113,8 @@ namespace AlphaPseudo
xc->getCpuPtr()->cycles(cycles));
xc->suspend();
- xc->getCpuPtr()->kernelStats->quiesce();
+ if (xc->getKernelStats())
+ xc->getKernelStats()->quiesce();
}
uint64_t
@@ -121,7 +126,8 @@ namespace AlphaPseudo
void
ivlb(ExecContext *xc)
{
- xc->getCpuPtr()->kernelStats->ivlb();
+ if (xc->getKernelStats())
+ xc->getKernelStats()->ivlb();
}
void