summaryrefslogtreecommitdiff
path: root/src/cpu/kvm/base.cc
diff options
context:
space:
mode:
authorAndreas Sandberg <andreas@sandberg.pp.se>2013-05-02 12:02:19 +0200
committerAndreas Sandberg <andreas@sandberg.pp.se>2013-05-02 12:02:19 +0200
commitfa249461caa431b774b558349b32282477ef6153 (patch)
tree3f2175589e2552b662c4d6bfc5f2f8353f1c6e43 /src/cpu/kvm/base.cc
parent41156c8196589dfca96a7370a7719a6c5bc9982c (diff)
downloadgem5-fa249461caa431b774b558349b32282477ef6153.tar.xz
kvm: Add checkpoint debug print
Add a debug print (when the Checkpoint debug flag is set) on serialize and unserialize. Additionally, dump the KVM state before serializing. The KVM state isn't dumped after unserializing since the state is loaded lazily on the next KVM entry.
Diffstat (limited to 'src/cpu/kvm/base.cc')
-rw-r--r--src/cpu/kvm/base.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/cpu/kvm/base.cc b/src/cpu/kvm/base.cc
index 59553b42c..510d6ae25 100644
--- a/src/cpu/kvm/base.cc
+++ b/src/cpu/kvm/base.cc
@@ -48,6 +48,7 @@
#include "arch/utility.hh"
#include "cpu/kvm/base.hh"
+#include "debug/Checkpoint.hh"
#include "debug/Kvm.hh"
#include "debug/KvmIO.hh"
#include "debug/KvmRun.hh"
@@ -213,6 +214,11 @@ BaseKvmCPU::regStats()
void
BaseKvmCPU::serializeThread(std::ostream &os, ThreadID tid)
{
+ if (DTRACE(Checkpoint)) {
+ DPRINTF(Checkpoint, "KVM: Serializing thread %i:\n", tid);
+ dump();
+ }
+
// Update the thread context so we have something to serialize.
syncThreadContext();
@@ -225,6 +231,8 @@ void
BaseKvmCPU::unserializeThread(Checkpoint *cp, const std::string &section,
ThreadID tid)
{
+ DPRINTF(Checkpoint, "KVM: Unserialize thread %i:\n", tid);
+
assert(tid == 0);
assert(_status == Idle);
thread->unserialize(cp, section);