From 4ae02295d59036fa2f9d272ee288e0321bb8257a Mon Sep 17 00:00:00 2001 From: Andreas Sandberg Date: Mon, 7 Jan 2013 13:05:44 -0500 Subject: cpu: Unify SimpleCPU and O3 CPU serialization code The O3 CPU used to copy its thread context to a SimpleThread in order to do serialization. This was a bit of a hack involving two static SimpleThread instances and a magic constructor that was only used by the O3 CPU. This patch moves the ThreadContext serialization code into two global procedures that, in addition to the normal serialization parameters, take a ThreadContext reference as a parameter. This allows us to reuse the serialization code in all ThreadContext implementations. --- src/cpu/o3/thread_context_impl.hh | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'src/cpu/o3/thread_context_impl.hh') diff --git a/src/cpu/o3/thread_context_impl.hh b/src/cpu/o3/thread_context_impl.hh index 4ab793538..2de6dbc1b 100755 --- a/src/cpu/o3/thread_context_impl.hh +++ b/src/cpu/o3/thread_context_impl.hh @@ -158,22 +158,6 @@ O3ThreadContext::regStats(const std::string &name) } } -template -void -O3ThreadContext::serialize(std::ostream &os) -{ - if (FullSystem && thread->kernelStats) - thread->kernelStats->serialize(os); -} - -template -void -O3ThreadContext::unserialize(Checkpoint *cp, const std::string §ion) -{ - if (FullSystem && thread->kernelStats) - thread->kernelStats->unserialize(cp, section); -} - template Tick O3ThreadContext::readLastActivate() -- cgit v1.2.3