From 043709fdfab3b6c46f6ef95d1f642cd3c06ee20a Mon Sep 17 00:00:00 2001 From: Geoffrey Blake Date: Fri, 9 Mar 2012 09:59:27 -0500 Subject: 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. --- src/cpu/ozone/cpu_impl.hh | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'src/cpu/ozone/cpu_impl.hh') 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 @@ -97,16 +93,12 @@ OzoneCPU::OzoneCPU(Params *p) _status = Idle; if (p->checker) { -#if USE_CHECKER BaseCPU *temp_checker = p->checker; checker = dynamic_cast *>(temp_checker); checker->setSystem(p->system); checkerTC = new CheckerThreadContext(&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::signalSwitched() if (++switchCount == 2) { backEnd->doSwitchOut(); frontEnd->doSwitchOut(); -#if USE_CHECKER + if (checker) checker->switchOut(); -#endif _status = SwitchedOut; #ifndef NDEBUG -- cgit v1.2.3