summaryrefslogtreecommitdiff
path: root/src/cpu/inorder/thread_state.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/cpu/inorder/thread_state.hh')
-rw-r--r--src/cpu/inorder/thread_state.hh30
1 files changed, 26 insertions, 4 deletions
diff --git a/src/cpu/inorder/thread_state.hh b/src/cpu/inorder/thread_state.hh
index 9b3b39fcb..422df30aa 100644
--- a/src/cpu/inorder/thread_state.hh
+++ b/src/cpu/inorder/thread_state.hh
@@ -33,13 +33,23 @@
#include "arch/faults.hh"
#include "arch/isa_traits.hh"
+#include "base/callback.hh"
+#include "base/output.hh"
#include "cpu/thread_context.hh"
#include "cpu/thread_state.hh"
+#include "sim/sim_exit.hh"
class Event;
+class InOrderCPU;
+
+#if FULL_SYSTEM
+class EndQuiesceEvent;
+class FunctionProfile;
+class ProfileNode;
+#else
class FunctionalMemory;
class Process;
-class InOrderCPU;
+#endif
/**
* Class that has various thread state, such as the status, the
@@ -66,16 +76,28 @@ class InOrderThreadState : public ThreadState {
*/
bool trapPending;
-
+#if FULL_SYSTEM
+ InOrderThreadState(InOrderCPU *_cpu, ThreadID _thread_num)
+ : ThreadState(reinterpret_cast<BaseCPU*>(_cpu), _thread_num),
+ cpu(_cpu), inSyscall(0), trapPending(0)
+ { }
+#else
InOrderThreadState(InOrderCPU *_cpu, ThreadID _thread_num,
Process *_process)
- : ThreadState(reinterpret_cast<BaseCPU*>(_cpu), 0/*_thread_num*/,
+ : ThreadState(reinterpret_cast<BaseCPU*>(_cpu), _thread_num,
_process),
cpu(_cpu), inSyscall(0), trapPending(0)
{ }
+#endif
+#if !FULL_SYSTEM
/** Handles the syscall. */
void syscall(int64_t callnum) { process->syscall(callnum, tc); }
+#endif
+
+#if FULL_SYSTEM
+ void dumpFuncProfile();
+#endif
/** Pointer to the ThreadContext of this thread. */
ThreadContext *tc;
@@ -83,7 +105,7 @@ class InOrderThreadState : public ThreadState {
/** Returns a pointer to the TC of this thread. */
ThreadContext *getTC() { return tc; }
- int readTid() { return 0; }
+ int readTid() { return threadId(); }
/** Pointer to the last graduated instruction in the thread */
//DynInstPtr lastGradInst;