From de21bb93ea4312a7e958698c634b16b10e02e21a Mon Sep 17 00:00:00 2001 From: Gabe Black Date: Fri, 18 Nov 2011 01:33:28 -0800 Subject: SE/FS: Get rid of FULL_SYSTEM in the CPU directory. --- src/cpu/thread_state.cc | 47 +++++++++++++++++++++-------------------------- 1 file changed, 21 insertions(+), 26 deletions(-) (limited to 'src/cpu/thread_state.cc') diff --git a/src/cpu/thread_state.cc b/src/cpu/thread_state.cc index efb1d5469..ef81271a8 100644 --- a/src/cpu/thread_state.cc +++ b/src/cpu/thread_state.cc @@ -28,29 +28,24 @@ * Authors: Kevin Lim */ +#include "arch/kernel_stats.hh" #include "base/output.hh" #include "cpu/base.hh" #include "cpu/profile.hh" +#include "cpu/quiesce_event.hh" #include "cpu/thread_state.hh" #include "mem/port.hh" #include "mem/translating_port.hh" #include "mem/vport.hh" +#include "sim/full_system.hh" #include "sim/serialize.hh" -#if FULL_SYSTEM -#include "arch/kernel_stats.hh" -#include "cpu/quiesce_event.hh" -#endif - ThreadState::ThreadState(BaseCPU *cpu, ThreadID _tid, Process *_process) : numInst(0), numLoad(0), _status(ThreadContext::Halted), baseCpu(cpu), _threadId(_tid), lastActivate(0), lastSuspend(0), -#if FULL_SYSTEM profile(NULL), profileNode(NULL), profilePC(0), quiesceEvent(NULL), - kernelStats(NULL), -#endif - process(_process), port(NULL), virtPort(NULL), physPort(NULL), - funcExeInst(0), storeCondFailures(0) + kernelStats(NULL), process(_process), port(NULL), virtPort(NULL), + physPort(NULL), funcExeInst(0), storeCondFailures(0) { } @@ -69,14 +64,14 @@ ThreadState::serialize(std::ostream &os) // thread_num and cpu_id are deterministic from the config SERIALIZE_SCALAR(funcExeInst); -#if FULL_SYSTEM - Tick quiesceEndTick = 0; - if (quiesceEvent->scheduled()) - quiesceEndTick = quiesceEvent->when(); - SERIALIZE_SCALAR(quiesceEndTick); - if (kernelStats) - kernelStats->serialize(os); -#endif + if (FullSystem) { + Tick quiesceEndTick = 0; + if (quiesceEvent->scheduled()) + quiesceEndTick = quiesceEvent->when(); + SERIALIZE_SCALAR(quiesceEndTick); + if (kernelStats) + kernelStats->serialize(os); + } } void @@ -87,14 +82,14 @@ ThreadState::unserialize(Checkpoint *cp, const std::string §ion) // thread_num and cpu_id are deterministic from the config UNSERIALIZE_SCALAR(funcExeInst); -#if FULL_SYSTEM - Tick quiesceEndTick; - UNSERIALIZE_SCALAR(quiesceEndTick); - if (quiesceEndTick) - baseCpu->schedule(quiesceEvent, quiesceEndTick); - if (kernelStats) - kernelStats->unserialize(cp, section); -#endif + if (FullSystem) { + Tick quiesceEndTick; + UNSERIALIZE_SCALAR(quiesceEndTick); + if (quiesceEndTick) + baseCpu->schedule(quiesceEvent, quiesceEndTick); + if (kernelStats) + kernelStats->unserialize(cp, section); + } } void -- cgit v1.2.3