summaryrefslogtreecommitdiff
path: root/cpu/cpu_exec_context.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 /cpu/cpu_exec_context.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 'cpu/cpu_exec_context.cc')
-rw-r--r--cpu/cpu_exec_context.cc9
1 files changed, 8 insertions, 1 deletions
diff --git a/cpu/cpu_exec_context.cc b/cpu/cpu_exec_context.cc
index 24de6d450..78ce058e8 100644
--- a/cpu/cpu_exec_context.cc
+++ b/cpu/cpu_exec_context.cc
@@ -188,7 +188,8 @@ CPUExecContext::serialize(ostream &os)
if (quiesceEvent->scheduled())
quiesceEndTick = quiesceEvent->when();
SERIALIZE_SCALAR(quiesceEndTick);
-
+ if (kernelStats)
+ kernelStats->serialize(os);
#endif
}
@@ -207,6 +208,8 @@ CPUExecContext::unserialize(Checkpoint *cp, const std::string &section)
UNSERIALIZE_SCALAR(quiesceEndTick);
if (quiesceEndTick)
quiesceEvent->schedule(quiesceEndTick);
+ if (kernelStats)
+ kernelStats->unserialize(cp, section);
#endif
}
@@ -275,6 +278,10 @@ CPUExecContext::halt()
void
CPUExecContext::regStats(const string &name)
{
+#if FULL_SYSTEM
+ kernelStats = new Kernel::Statistics(system);
+ kernelStats->regStats(name + ".kern");
+#endif
}
void