diff options
author | Gabe Black <gblack@eecs.umich.edu> | 2012-01-31 22:40:08 -0800 |
---|---|---|
committer | Gabe Black <gblack@eecs.umich.edu> | 2012-01-31 22:40:08 -0800 |
commit | ea8b347dc5d375572d8d19770024ec8be5fd5017 (patch) | |
tree | 56bb75b1f071a749b7e90218d0d6b0e9265657bb /src/cpu/simple_thread.cc | |
parent | e88165a431a90cf7e33e205794caed898ca6fcb1 (diff) | |
parent | 7d4f18770073d968c70cd3ffcdd117f50a6056a2 (diff) | |
download | gem5-ea8b347dc5d375572d8d19770024ec8be5fd5017.tar.xz |
Merge with head, hopefully the last time for this batch.
Diffstat (limited to 'src/cpu/simple_thread.cc')
-rw-r--r-- | src/cpu/simple_thread.cc | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/src/cpu/simple_thread.cc b/src/cpu/simple_thread.cc index a12ab8e8a..e193b1273 100644 --- a/src/cpu/simple_thread.cc +++ b/src/cpu/simple_thread.cc @@ -47,14 +47,13 @@ #include "cpu/quiesce_event.hh" #include "cpu/simple_thread.hh" #include "cpu/thread_context.hh" -#include "params/BaseCPU.hh" #include "mem/fs_translating_port_proxy.hh" #include "mem/se_translating_port_proxy.hh" +#include "params/BaseCPU.hh" #include "sim/full_system.hh" #include "sim/process.hh" #include "sim/serialize.hh" #include "sim/sim_exit.hh" -#include "sim/process.hh" #include "sim/system.hh" using namespace std; @@ -62,8 +61,7 @@ using namespace std; // constructor SimpleThread::SimpleThread(BaseCPU *_cpu, int _thread_num, Process *_process, TheISA::TLB *_itb, TheISA::TLB *_dtb) - : ThreadState(_cpu, _thread_num, _process), - cpu(_cpu), itb(_itb), dtb(_dtb) + : ThreadState(_cpu, _thread_num, _process), itb(_itb), dtb(_dtb) { clearArchRegs(); tc = new ProxyThreadContext<SimpleThread>(this); @@ -71,9 +69,7 @@ SimpleThread::SimpleThread(BaseCPU *_cpu, int _thread_num, Process *_process, SimpleThread::SimpleThread(BaseCPU *_cpu, int _thread_num, System *_sys, TheISA::TLB *_itb, TheISA::TLB *_dtb, bool use_kernel_stats) - : ThreadState(_cpu, _thread_num, NULL), - cpu(_cpu), system(_sys), itb(_itb), dtb(_dtb) - + : ThreadState(_cpu, _thread_num, NULL), system(_sys), itb(_itb), dtb(_dtb) { tc = new ProxyThreadContext<SimpleThread>(this); @@ -81,7 +77,7 @@ SimpleThread::SimpleThread(BaseCPU *_cpu, int _thread_num, System *_sys, clearArchRegs(); - if (cpu->params()->profile) { + if (baseCpu->params()->profile) { profile = new FunctionProfile(system->kernelSymtab); Callback *cb = new MakeCallback<SimpleThread, @@ -183,7 +179,7 @@ SimpleThread::serialize(ostream &os) // // Now must serialize all the ISA dependent state // - isa.serialize(cpu, os); + isa.serialize(baseCpu, os); } @@ -199,13 +195,14 @@ SimpleThread::unserialize(Checkpoint *cp, const std::string §ion) // // Now must unserialize all the ISA dependent state // - isa.unserialize(cpu, cp, section); + isa.unserialize(baseCpu, cp, section); } void SimpleThread::dumpFuncProfile() { - std::ostream *os = simout.create(csprintf("profile.%s.dat", cpu->name())); + std::ostream *os = simout.create(csprintf("profile.%s.dat", + baseCpu->name())); profile->dump(tc, *os); } @@ -225,7 +222,7 @@ SimpleThread::activate(int delay) _status = ThreadContext::Active; // status() == Suspended - cpu->activateContext(_threadId, delay); + baseCpu->activateContext(_threadId, delay); } void @@ -237,7 +234,7 @@ SimpleThread::suspend() lastActivate = curTick(); lastSuspend = curTick(); _status = ThreadContext::Suspended; - cpu->suspendContext(_threadId); + baseCpu->suspendContext(_threadId); } @@ -248,7 +245,7 @@ SimpleThread::halt() return; _status = ThreadContext::Halted; - cpu->haltContext(_threadId); + baseCpu->haltContext(_threadId); } |