summaryrefslogtreecommitdiff
path: root/sim/pseudo_inst.cc
diff options
context:
space:
mode:
authorKevin Lim <ktlim@umich.edu>2006-05-23 16:51:16 -0400
committerKevin Lim <ktlim@umich.edu>2006-05-23 16:51:16 -0400
commitff3d16ca1f7d83ce7932868d2bf1cb3e526562ea (patch)
tree4eb98bbfb6ae8a7ead5f6ac70905c352b51c6a80 /sim/pseudo_inst.cc
parente3d5588ca70c88318c1e41e438102034c92c561e (diff)
downloadgem5-ff3d16ca1f7d83ce7932868d2bf1cb3e526562ea.tar.xz
Move kernel stats out of CPU and into XC.
arch/alpha/ev5.cc: Move kernel stats out of CPU and into XC. Also be sure to check if the kernel stats exist prior to using them. --HG-- extra : convert_revision : 565cd7026410fd7d8586f953d9b328c2e67a9473
Diffstat (limited to 'sim/pseudo_inst.cc')
-rw-r--r--sim/pseudo_inst.cc15
1 files changed, 10 insertions, 5 deletions
diff --git a/sim/pseudo_inst.cc b/sim/pseudo_inst.cc
index 4d9541b58..0c20a6a53 100644
--- a/sim/pseudo_inst.cc
+++ b/sim/pseudo_inst.cc
@@ -65,7 +65,8 @@ namespace AlphaPseudo
void
arm(ExecContext *xc)
{
- xc->getCpuPtr()->kernelStats->arm();
+ if (xc->getKernelStats())
+ xc->getKernelStats()->arm();
}
void
@@ -75,7 +76,8 @@ namespace AlphaPseudo
return;
xc->suspend();
- xc->getCpuPtr()->kernelStats->quiesce();
+ if (xc->getKernelStats())
+ xc->getKernelStats()->arm();
}
void
@@ -92,7 +94,8 @@ namespace AlphaPseudo
quiesceEvent->schedule(curTick + Clock::Int::ns * ns);
xc->suspend();
- xc->getCpuPtr()->kernelStats->quiesce();
+ if (xc->getKernelStats())
+ xc->getKernelStats()->quiesce();
}
void
@@ -111,7 +114,8 @@ namespace AlphaPseudo
xc->getCpuPtr()->cycles(cycles));
xc->suspend();
- xc->getCpuPtr()->kernelStats->quiesce();
+ if (xc->getKernelStats())
+ xc->getKernelStats()->quiesce();
}
uint64_t
@@ -123,7 +127,8 @@ namespace AlphaPseudo
void
ivlb(ExecContext *xc)
{
- xc->getCpuPtr()->kernelStats->ivlb();
+ if (xc->getKernelStats())
+ xc->getKernelStats()->ivlb();
}
void