summaryrefslogtreecommitdiff
path: root/src/cpu/ozone/cpu_impl.hh
diff options
context:
space:
mode:
authorGeoffrey Blake <geoffrey.blake@arm.com>2012-03-09 09:59:27 -0500
committerGeoffrey Blake <geoffrey.blake@arm.com>2012-03-09 09:59:27 -0500
commit043709fdfab3b6c46f6ef95d1f642cd3c06ee20a (patch)
treeef8bab03f4260b67b57b00844d0245ca1e849ea0 /src/cpu/ozone/cpu_impl.hh
parentdf05ffab1289b26aab2a0eb71ee55dcb7f42e5e9 (diff)
downloadgem5-043709fdfab3b6c46f6ef95d1f642cd3c06ee20a.tar.xz
CheckerCPU: Make CheckerCPU runtime selectable instead of compile selectable
Enables the CheckerCPU to be selected at runtime with the --checker option from the configs/example/fs.py and configs/example/se.py configuration files. Also merges with the SE/FS changes.
Diffstat (limited to 'src/cpu/ozone/cpu_impl.hh')
-rw-r--r--src/cpu/ozone/cpu_impl.hh13
1 files changed, 2 insertions, 11 deletions
diff --git a/src/cpu/ozone/cpu_impl.hh b/src/cpu/ozone/cpu_impl.hh
index 65545b6aa..b111d4425 100644
--- a/src/cpu/ozone/cpu_impl.hh
+++ b/src/cpu/ozone/cpu_impl.hh
@@ -38,7 +38,7 @@
#include "base/callback.hh"
#include "base/trace.hh"
#include "config/the_isa.hh"
-#include "config/use_checker.hh"
+#include "cpu/checker/thread_context.hh"
#include "cpu/ozone/cpu.hh"
#include "cpu/base.hh"
#include "cpu/exetrace.hh"
@@ -56,10 +56,6 @@
#include "sim/stats.hh"
#include "sim/system.hh"
-#if USE_CHECKER
-#include "cpu/checker/thread_context.hh"
-#endif
-
using namespace TheISA;
template <class Impl>
@@ -97,16 +93,12 @@ OzoneCPU<Impl>::OzoneCPU(Params *p)
_status = Idle;
if (p->checker) {
-#if USE_CHECKER
BaseCPU *temp_checker = p->checker;
checker = dynamic_cast<Checker<DynInstPtr> *>(temp_checker);
checker->setSystem(p->system);
checkerTC = new CheckerThreadContext<OzoneTC>(&ozoneTC, checker);
thread.tc = checkerTC;
tc = checkerTC;
-#else
- panic("Checker enabled but not compiled in!");
-#endif
} else {
// If checker is not being used, then the xcProxy points
// directly to the CPU's ExecContext.
@@ -215,10 +207,9 @@ OzoneCPU<Impl>::signalSwitched()
if (++switchCount == 2) {
backEnd->doSwitchOut();
frontEnd->doSwitchOut();
-#if USE_CHECKER
+
if (checker)
checker->switchOut();
-#endif
_status = SwitchedOut;
#ifndef NDEBUG