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
This commit is contained in:
Kevin Lim
2006-05-23 16:51:16 -04:00
parent e3d5588ca7
commit ff3d16ca1f
15 changed files with 221 additions and 276 deletions

View File

@@ -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