summaryrefslogtreecommitdiff
path: root/src/cpu/thread_state.cc
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2011-11-18 01:33:28 -0800
committerGabe Black <gblack@eecs.umich.edu>2011-11-18 01:33:28 -0800
commitde21bb93ea4312a7e958698c634b16b10e02e21a (patch)
treec8aa7999dd0d5373c1de0d77eab7fd40f1d1a8fc /src/cpu/thread_state.cc
parentec32d85f9dbd2354dea330deb4e984a43d4dbe5d (diff)
downloadgem5-de21bb93ea4312a7e958698c634b16b10e02e21a.tar.xz
SE/FS: Get rid of FULL_SYSTEM in the CPU directory.
Diffstat (limited to 'src/cpu/thread_state.cc')
-rw-r--r--src/cpu/thread_state.cc47
1 files changed, 21 insertions, 26 deletions
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 &section)
// 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