summaryrefslogtreecommitdiff
path: root/arch/alpha
diff options
context:
space:
mode:
authorKevin Lim <ktlim@umich.edu>2006-05-25 11:50:42 -0400
committerKevin Lim <ktlim@umich.edu>2006-05-25 11:50:42 -0400
commit32509d83878816cd870cea1ccbb8a9eb46a1e3f6 (patch)
tree0f929cba3e705d60625830548cbbb3a2c4d9af62 /arch/alpha
parent3fe35232322daef87a0b85d7f3ca4c18330ed7c4 (diff)
downloadgem5-32509d83878816cd870cea1ccbb8a9eb46a1e3f6.tar.xz
Fix up kernel stats, allow them to not be used as well.
arch/alpha/ev5.cc: Fix up some stuff I missed in the last kernel stats checkin. cpu/checker/cpu.cc: Allow the checker to disable its kernel stats. cpu/cpu_exec_context.cc: Allow CPUExecContext to be created without kernelStats. cpu/cpu_exec_context.hh: Allow CPUExecContext to be created without kernelStats. Default usage leaves kernelStats on. --HG-- extra : convert_revision : 8ed5bffd3a5b6275baa07fb4ea385eeab1a0456a
Diffstat (limited to 'arch/alpha')
-rw-r--r--arch/alpha/ev5.cc13
1 files changed, 7 insertions, 6 deletions
diff --git a/arch/alpha/ev5.cc b/arch/alpha/ev5.cc
index ad3a9ec4c..f113a2767 100644
--- a/arch/alpha/ev5.cc
+++ b/arch/alpha/ev5.cc
@@ -146,7 +146,8 @@ CPUExecContext::hwrei()
setNextPC(readMiscReg(AlphaISA::IPR_EXC_ADDR));
if (!misspeculating()) {
- kernelStats->hwrei();
+ if (kernelStats)
+ kernelStats->hwrei();
cpu->checkInterrupts = true;
}
@@ -372,10 +373,9 @@ AlphaISA::MiscRegFile::setIpr(int idx, uint64_t val, ExecContext *xc)
if (val & 0x18) {
if (xc->getKernelStats())
xc->getKernelStats()->mode(Kernel::user, xc);
- else {
- if (xc->getKernelStats())
- xc->getKernelStats()->mode(Kernel::kernel, xc);
- }
+ } else {
+ if (xc->getKernelStats())
+ xc->getKernelStats()->mode(Kernel::kernel, xc);
}
case AlphaISA::IPR_ICM:
@@ -562,7 +562,8 @@ AlphaISA::MiscRegFile::copyIprs(ExecContext *xc)
bool
CPUExecContext::simPalCheck(int palFunc)
{
- kernelStats->callpal(palFunc, proxy);
+ if (kernelStats)
+ kernelStats->callpal(palFunc, proxy);
switch (palFunc) {
case PAL::halt: