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/thread_context.hh | |
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/thread_context.hh')
-rw-r--r-- | src/cpu/thread_context.hh | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/src/cpu/thread_context.hh b/src/cpu/thread_context.hh index e4e26d03c..f7879ea60 100644 --- a/src/cpu/thread_context.hh +++ b/src/cpu/thread_context.hh @@ -37,7 +37,6 @@ #include "arch/registers.hh" #include "arch/types.hh" #include "base/types.hh" -#include "config/full_system.hh" #include "config/the_isa.hh" // @todo: Figure out a more architecture independent way to obtain the ITB and @@ -125,11 +124,10 @@ class ThreadContext virtual System *getSystemPtr() = 0; -#if FULL_SYSTEM virtual TheISA::Kernel::Statistics *getKernelStats() = 0; virtual void connectMemPorts(ThreadContext *tc) = 0; -#endif + virtual Process *getProcessPtr() = 0; virtual TranslatingPort *getMemPort() = 0; @@ -152,9 +150,7 @@ class ThreadContext /// Set the status to Halted. virtual void halt(int delay = 0) = 0; -#if FULL_SYSTEM virtual void dumpFuncProfile() = 0; -#endif virtual void takeOverFrom(ThreadContext *old_context) = 0; @@ -163,7 +159,6 @@ class ThreadContext virtual void serialize(std::ostream &os) = 0; virtual void unserialize(Checkpoint *cp, const std::string §ion) = 0; -#if FULL_SYSTEM virtual EndQuiesceEvent *getQuiesceEvent() = 0; // Not necessarily the best location for these... @@ -173,7 +168,6 @@ class ThreadContext virtual void profileClear() = 0; virtual void profileSample() = 0; -#endif virtual void copyArchRegs(ThreadContext *tc) = 0; @@ -235,7 +229,6 @@ class ThreadContext // Only really makes sense for old CPU model. Still could be useful though. virtual bool misspeculating() = 0; -#if !FULL_SYSTEM // Same with st cond failures. virtual Counter readFuncExeInst() = 0; @@ -245,7 +238,6 @@ class ThreadContext // 1 if the CPU has no more active threads (meaning it's OK to exit); // Used in syscall-emulation mode when a thread calls the exit syscall. virtual int exit() { return 1; }; -#endif /** function to compare two thread contexts (for debugging) */ static void compare(ThreadContext *one, ThreadContext *two); @@ -293,12 +285,11 @@ class ProxyThreadContext : public ThreadContext System *getSystemPtr() { return actualTC->getSystemPtr(); } -#if FULL_SYSTEM TheISA::Kernel::Statistics *getKernelStats() { return actualTC->getKernelStats(); } void connectMemPorts(ThreadContext *tc) { actualTC->connectMemPorts(tc); } -#endif + Process *getProcessPtr() { return actualTC->getProcessPtr(); } TranslatingPort *getMemPort() { return actualTC->getMemPort(); } @@ -321,9 +312,7 @@ class ProxyThreadContext : public ThreadContext /// Set the status to Halted. void halt(int delay = 0) { actualTC->halt(); } -#if FULL_SYSTEM void dumpFuncProfile() { actualTC->dumpFuncProfile(); } -#endif void takeOverFrom(ThreadContext *oldContext) { actualTC->takeOverFrom(oldContext); } @@ -334,7 +323,6 @@ class ProxyThreadContext : public ThreadContext void unserialize(Checkpoint *cp, const std::string §ion) { actualTC->unserialize(cp, section); } -#if FULL_SYSTEM EndQuiesceEvent *getQuiesceEvent() { return actualTC->getQuiesceEvent(); } Tick readLastActivate() { return actualTC->readLastActivate(); } @@ -342,7 +330,6 @@ class ProxyThreadContext : public ThreadContext void profileClear() { return actualTC->profileClear(); } void profileSample() { return actualTC->profileSample(); } -#endif // @todo: Do I need this? void copyArchRegs(ThreadContext *tc) { actualTC->copyArchRegs(tc); } @@ -410,12 +397,10 @@ class ProxyThreadContext : public ThreadContext // @todo: Fix this! bool misspeculating() { return actualTC->misspeculating(); } -#if !FULL_SYSTEM void syscall(int64_t callnum) { actualTC->syscall(callnum); } Counter readFuncExeInst() { return actualTC->readFuncExeInst(); } -#endif }; #endif |