diff options
author | Gabe Black <gblack@eecs.umich.edu> | 2011-10-31 02:58:22 -0700 |
---|---|---|
committer | Gabe Black <gblack@eecs.umich.edu> | 2011-10-31 02:58:22 -0700 |
commit | 8ad2b8c5596b817267fbf7a39e6ce28ffb49789c (patch) | |
tree | e20e9aa7253fb12e2e6b8abf8932e726728004c1 /src/cpu/o3 | |
parent | ef097eb69cec0753074d5190e5ff91aabfaef5e5 (diff) | |
download | gem5-8ad2b8c5596b817267fbf7a39e6ce28ffb49789c.tar.xz |
SE/FS: Make the functions available from the TC consistent between SE and FS.
Diffstat (limited to 'src/cpu/o3')
-rw-r--r-- | src/cpu/o3/cpu.cc | 4 | ||||
-rw-r--r-- | src/cpu/o3/cpu.hh | 2 | ||||
-rwxr-xr-x | src/cpu/o3/thread_context.hh | 15 | ||||
-rwxr-xr-x | src/cpu/o3/thread_context_impl.hh | 4 | ||||
-rw-r--r-- | src/cpu/o3/thread_state.hh | 15 |
5 files changed, 8 insertions, 32 deletions
diff --git a/src/cpu/o3/cpu.cc b/src/cpu/o3/cpu.cc index 371e4d53c..1ffd014cd 100644 --- a/src/cpu/o3/cpu.cc +++ b/src/cpu/o3/cpu.cc @@ -983,8 +983,6 @@ FullO3CPU<Impl>::trap(Fault fault, ThreadID tid, StaticInstPtr inst) fault->invoke(this->threadContexts[tid], inst); } -#if !FULL_SYSTEM - template <class Impl> void FullO3CPU<Impl>::syscall(int64_t callnum, ThreadID tid) @@ -1005,8 +1003,6 @@ FullO3CPU<Impl>::syscall(int64_t callnum, ThreadID tid) --(this->thread[tid]->funcExeInst); } -#endif - template <class Impl> void FullO3CPU<Impl>::serialize(std::ostream &os) diff --git a/src/cpu/o3/cpu.hh b/src/cpu/o3/cpu.hh index dd9f5d40f..8eb32fae6 100644 --- a/src/cpu/o3/cpu.hh +++ b/src/cpu/o3/cpu.hh @@ -350,12 +350,10 @@ class FullO3CPU : public BaseO3CPU virtual void unserialize(Checkpoint *cp, const std::string §ion); public: -#if !FULL_SYSTEM /** Executes a syscall. * @todo: Determine if this needs to be virtual. */ void syscall(int64_t callnum, ThreadID tid); -#endif /** Starts draining the CPU's pipeline of all instructions in * order to stop all memory accesses. */ diff --git a/src/cpu/o3/thread_context.hh b/src/cpu/o3/thread_context.hh index 145d6fd29..815c9cb64 100755 --- a/src/cpu/o3/thread_context.hh +++ b/src/cpu/o3/thread_context.hh @@ -92,13 +92,13 @@ class O3ThreadContext : public ThreadContext /** Returns a pointer to the system. */ virtual System *getSystemPtr() { return cpu->system; } -#if FULL_SYSTEM /** Returns a pointer to this thread's kernel statistics. */ virtual TheISA::Kernel::Statistics *getKernelStats() { return thread->kernelStats; } - virtual void connectMemPorts(ThreadContext *tc) { thread->connectMemPorts(tc); } -#endif + virtual void connectMemPorts(ThreadContext *tc) + { thread->connectMemPorts(tc); } + /** Returns a pointer to this thread's process. */ virtual Process *getProcessPtr() { return thread->getProcessPtr(); } @@ -125,12 +125,11 @@ class O3ThreadContext : public ThreadContext /** Set the status to Halted. */ virtual void halt(int delay = 0); -#if FULL_SYSTEM /** Dumps the function profiling information. * @todo: Implement. */ virtual void dumpFuncProfile(); -#endif + /** Takes over execution of a thread from another CPU. */ virtual void takeOverFrom(ThreadContext *old_context); @@ -142,7 +141,6 @@ class O3ThreadContext : public ThreadContext /** Unserializes state. */ virtual void unserialize(Checkpoint *cp, const std::string §ion); -#if FULL_SYSTEM /** Reads the last tick that this thread was activated on. */ virtual Tick readLastActivate(); /** Reads the last tick that this thread was suspended on. */ @@ -152,7 +150,6 @@ class O3ThreadContext : public ThreadContext virtual void profileClear(); /** Samples the function profiling information. */ virtual void profileSample(); -#endif /** Copies the architectural registers from another TC into this TC. */ virtual void copyArchRegs(ThreadContext *tc); @@ -229,20 +226,18 @@ class O3ThreadContext : public ThreadContext * misspeculating, this is set as false. */ virtual bool misspeculating() { return false; } -#if !FULL_SYSTEM /** Executes a syscall in SE mode. */ virtual void syscall(int64_t callnum) { return cpu->syscall(callnum, thread->threadId()); } /** Reads the funcExeInst counter. */ virtual Counter readFuncExeInst() { return thread->funcExeInst; } -#else + /** Returns pointer to the quiesce event. */ virtual EndQuiesceEvent *getQuiesceEvent() { return this->thread->quiesceEvent; } -#endif }; diff --git a/src/cpu/o3/thread_context_impl.hh b/src/cpu/o3/thread_context_impl.hh index 0952465d4..a49440f1f 100755 --- a/src/cpu/o3/thread_context_impl.hh +++ b/src/cpu/o3/thread_context_impl.hh @@ -54,14 +54,12 @@ O3ThreadContext<Impl>::getVirtPort() return thread->getVirtPort(); } -#if FULL_SYSTEM template <class Impl> void O3ThreadContext<Impl>::dumpFuncProfile() { thread->dumpFuncProfile(); } -#endif template <class Impl> void @@ -197,7 +195,6 @@ O3ThreadContext<Impl>::unserialize(Checkpoint *cp, const std::string §ion) } -#if FULL_SYSTEM template <class Impl> Tick O3ThreadContext<Impl>::readLastActivate() @@ -225,7 +222,6 @@ O3ThreadContext<Impl>::profileSample() { thread->profileSample(); } -#endif template <class Impl> void diff --git a/src/cpu/o3/thread_state.hh b/src/cpu/o3/thread_state.hh index 40e5c049b..1d58e2b27 100644 --- a/src/cpu/o3/thread_state.hh +++ b/src/cpu/o3/thread_state.hh @@ -37,17 +37,12 @@ #include "cpu/thread_state.hh" #include "sim/sim_exit.hh" -class Event; -class Process; - -#if FULL_SYSTEM class EndQuiesceEvent; -class FunctionProfile; -class ProfileNode; -#else +class Event; class FunctionalMemory; +class FunctionProfile; class Process; -#endif +class ProfileNode; /** * Class that has various thread state, such as the status, the @@ -102,18 +97,14 @@ struct O3ThreadState : public ThreadState { /** Returns a pointer to the TC of this thread. */ ThreadContext *getTC() { return tc; } -#if !FULL_SYSTEM /** Handles the syscall. */ void syscall(int64_t callnum) { process->syscall(callnum, tc); } -#endif -#if FULL_SYSTEM void dumpFuncProfile() { std::ostream *os = simout.create(csprintf("profile.%s.dat", cpu->name())); profile->dump(tc, *os); } -#endif }; #endif // __CPU_O3_THREAD_STATE_HH__ |