diff -r 8f1707cfa05b -r b91276bb6dec src/cpu/simple_thread.hh --- a/src/cpu/simple_thread.hh Fri Jan 27 13:03:18 2012 +0000 +++ b/src/cpu/simple_thread.hh Fri Jan 27 13:03:18 2012 +0000 @@ -117,12 +117,9 @@ public: std::string name() const { - return csprintf("%s.[tid:%i]", cpu->name(), tc->threadId()); + return csprintf("%s.[tid:%i]", baseCpu->name(), tc->threadId()); } - // pointer to CPU associated with this SimpleThread - BaseCPU *cpu; - ProxyThreadContext *tc; System *system; @@ -197,7 +194,7 @@ * ThreadContext interface functions. ******************************************/ - BaseCPU *getCpuPtr() { return cpu; } + BaseCPU *getCpuPtr() { return baseCpu; } TheISA::TLB *getITBPtr() { return itb; } diff -r 8f1707cfa05b -r b91276bb6dec src/cpu/simple_thread.cc --- a/src/cpu/simple_thread.cc Fri Jan 27 13:03:18 2012 +0000 +++ b/src/cpu/simple_thread.cc Fri Jan 27 13:03:18 2012 +0000 @@ -67,7 +67,7 @@ TheISA::TLB *_itb, TheISA::TLB *_dtb, bool use_kernel_stats) : ThreadState(_cpu, _thread_num), - cpu(_cpu), system(_sys), itb(_itb), dtb(_dtb) + system(_sys), itb(_itb), dtb(_dtb) { tc = new ProxyThreadContext(this); @@ -76,7 +76,7 @@ clearArchRegs(); - if (cpu->params()->profile) { + if (baseCpu->params()->profile) { profile = new FunctionProfile(system->kernelSymtab); Callback *cb = new MakeCallback(this); @@ -196,7 +196,7 @@ // // Now must serialize all the ISA dependent state // - isa.serialize(cpu, os); + isa.serialize(baseCpu, os); } @@ -212,14 +212,15 @@ // // Now must unserialize all the ISA dependent state // - isa.unserialize(cpu, cp, section); + isa.unserialize(baseCpu, cp, section); } #if FULL_SYSTEM 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); } #endif @@ -240,7 +241,7 @@ _status = ThreadContext::Active; // status() == Suspended - cpu->activateContext(_threadId, delay); + baseCpu->activateContext(_threadId, delay); } void @@ -261,7 +262,7 @@ #endif */ _status = ThreadContext::Suspended; - cpu->suspendContext(_threadId); + baseCpu->suspendContext(_threadId); } @@ -272,7 +273,7 @@ return; _status = ThreadContext::Halted; - cpu->haltContext(_threadId); + baseCpu->haltContext(_threadId); } diff -r 8f1707cfa05b -r b91276bb6dec src/cpu/thread_state.hh --- a/src/cpu/thread_state.hh Fri Jan 27 13:03:18 2012 +0000 +++ b/src/cpu/thread_state.hh Fri Jan 27 13:03:18 2012 +0000 @@ -73,7 +73,7 @@ ThreadState(BaseCPU *cpu, ThreadID _tid, Process *_process); #endif - ~ThreadState(); + virtual ~ThreadState(); void serialize(std::ostream &os);