summaryrefslogtreecommitdiff
path: root/src/cpu/o3
diff options
context:
space:
mode:
Diffstat (limited to 'src/cpu/o3')
-rw-r--r--src/cpu/o3/cpu.cc28
-rw-r--r--src/cpu/o3/cpu.hh7
2 files changed, 8 insertions, 27 deletions
diff --git a/src/cpu/o3/cpu.cc b/src/cpu/o3/cpu.cc
index cb17581e5..18c536090 100644
--- a/src/cpu/o3/cpu.cc
+++ b/src/cpu/o3/cpu.cc
@@ -1094,35 +1094,17 @@ FullO3CPU<Impl>::syscall(int64_t callnum, ThreadID tid)
template <class Impl>
void
-FullO3CPU<Impl>::serialize(std::ostream &os)
+FullO3CPU<Impl>::serializeThread(std::ostream &os, ThreadID tid)
{
- Drainable::State so_state(getDrainState());
- SERIALIZE_ENUM(so_state);
- BaseCPU::serialize(os);
- nameOut(os, csprintf("%s.tickEvent", name()));
- tickEvent.serialize(os);
-
- for (ThreadID i = 0; i < thread.size(); i++) {
- nameOut(os, csprintf("%s.xc.%i", name(), i));
- thread[i]->serialize(os);
- }
+ thread[tid]->serialize(os);
}
template <class Impl>
void
-FullO3CPU<Impl>::unserialize(Checkpoint *cp, const std::string &section)
+FullO3CPU<Impl>::unserializeThread(Checkpoint *cp, const std::string &section,
+ ThreadID tid)
{
- Drainable::State so_state;
- UNSERIALIZE_ENUM(so_state);
- BaseCPU::unserialize(cp, section);
- tickEvent.unserialize(cp, csprintf("%s.tickEvent", section));
-
- for (ThreadID i = 0; i < thread.size(); i++) {
- thread[i]->unserialize(cp,
- csprintf("%s.xc.%i", section, i));
- if (thread[i]->status() == ThreadContext::Active)
- activateThread(i);
- }
+ thread[tid]->unserialize(cp, section);
}
template <class Impl>
diff --git a/src/cpu/o3/cpu.hh b/src/cpu/o3/cpu.hh
index 24c4b46a8..5dd0e222d 100644
--- a/src/cpu/o3/cpu.hh
+++ b/src/cpu/o3/cpu.hh
@@ -446,11 +446,10 @@ class FullO3CPU : public BaseO3CPU
/** Is the CPU draining? */
bool isDraining() const { return getDrainState() == Drainable::Draining; }
- /** Serialize state. */
- virtual void serialize(std::ostream &os);
+ void serializeThread(std::ostream &os, ThreadID tid);
- /** Unserialize from a checkpoint. */
- virtual void unserialize(Checkpoint *cp, const std::string &section);
+ void unserializeThread(Checkpoint *cp, const std::string &section,
+ ThreadID tid);
public:
/** Executes a syscall.