summaryrefslogtreecommitdiff
path: root/src/cpu/o3
diff options
context:
space:
mode:
Diffstat (limited to 'src/cpu/o3')
-rw-r--r--src/cpu/o3/cpu.cc9
-rw-r--r--src/cpu/o3/cpu.hh7
-rw-r--r--src/cpu/o3/thread_state.hh12
3 files changed, 13 insertions, 15 deletions
diff --git a/src/cpu/o3/cpu.cc b/src/cpu/o3/cpu.cc
index 34ef275a7..18e958278 100644
--- a/src/cpu/o3/cpu.cc
+++ b/src/cpu/o3/cpu.cc
@@ -986,17 +986,16 @@ FullO3CPU<Impl>::syscall(int64_t callnum, ThreadID tid)
template <class Impl>
void
-FullO3CPU<Impl>::serializeThread(std::ostream &os, ThreadID tid)
+FullO3CPU<Impl>::serializeThread(CheckpointOut &cp, ThreadID tid) const
{
- thread[tid]->serialize(os);
+ thread[tid]->serialize(cp);
}
template <class Impl>
void
-FullO3CPU<Impl>::unserializeThread(Checkpoint *cp, const std::string &section,
- ThreadID tid)
+FullO3CPU<Impl>::unserializeThread(CheckpointIn &cp, ThreadID tid)
{
- thread[tid]->unserialize(cp, section);
+ thread[tid]->unserialize(cp);
}
template <class Impl>
diff --git a/src/cpu/o3/cpu.hh b/src/cpu/o3/cpu.hh
index c4ccd562b..bbc9fde8e 100644
--- a/src/cpu/o3/cpu.hh
+++ b/src/cpu/o3/cpu.hh
@@ -338,10 +338,9 @@ class FullO3CPU : public BaseO3CPU
/** Is the CPU draining? */
bool isDraining() const { return getDrainState() == Drainable::Draining; }
- void serializeThread(std::ostream &os, ThreadID tid);
-
- void unserializeThread(Checkpoint *cp, const std::string &section,
- ThreadID tid);
+ void serializeThread(CheckpointOut &cp,
+ ThreadID tid) const M5_ATTR_OVERRIDE;
+ void unserializeThread(CheckpointIn &cp, ThreadID tid) M5_ATTR_OVERRIDE;
public:
/** Executes a syscall.
diff --git a/src/cpu/o3/thread_state.hh b/src/cpu/o3/thread_state.hh
index eea7a3d16..cf9403e48 100644
--- a/src/cpu/o3/thread_state.hh
+++ b/src/cpu/o3/thread_state.hh
@@ -112,24 +112,24 @@ struct O3ThreadState : public ThreadState {
profilePC = 3;
}
- void serialize(std::ostream &os)
+ void serialize(CheckpointOut &cp) const M5_ATTR_OVERRIDE
{
- ThreadState::serialize(os);
+ ThreadState::serialize(cp);
// Use the ThreadContext serialization helper to serialize the
// TC.
- ::serialize(*tc, os);
+ ::serialize(*tc, cp);
}
- void unserialize(Checkpoint *cp, const std::string &section)
+ void unserialize(CheckpointIn &cp) M5_ATTR_OVERRIDE
{
// Prevent squashing - we don't have any instructions in
// flight that we need to squash since we just instantiated a
// clean system.
noSquashFromTC = true;
- ThreadState::unserialize(cp, section);
+ ThreadState::unserialize(cp);
// Use the ThreadContext serialization helper to unserialize
// the TC.
- ::unserialize(*tc, cp, section);
+ ::unserialize(*tc, cp);
noSquashFromTC = false;
}