gem5
|
Class that has various thread state, such as the status, the current instruction being processed, whether or not the thread has a trap pending or is being externally updated, the ThreadContext pointer, etc. More...
#include <commit.hh>
Public Types | |
typedef ThreadContext::Status | Status |
typedef Impl::O3CPU | O3CPU |
Public Types inherited from ThreadState | |
typedef ThreadContext::Status | Status |
Public Member Functions | |
O3ThreadState (O3CPU *_cpu, int _thread_num, Process *_process) | |
void | serialize (CheckpointOut &cp) const override |
Serialize an object. More... | |
void | unserialize (CheckpointIn &cp) override |
Unserialize an object. More... | |
ThreadContext * | getTC () |
Returns a pointer to the TC of this thread. More... | |
void | syscall (int64_t callnum, Fault *fault) |
Handles the syscall. More... | |
void | dumpFuncProfile () |
Public Member Functions inherited from ThreadState | |
ThreadState (BaseCPU *cpu, ThreadID _tid, Process *_process) | |
virtual | ~ThreadState () |
void | serialize (CheckpointOut &cp) const override |
Serialize an object. More... | |
void | unserialize (CheckpointIn &cp) override |
Unserialize an object. More... | |
int | cpuId () const |
uint32_t | socketId () const |
ContextID | contextId () const |
void | setContextId (ContextID id) |
void | setThreadId (ThreadID id) |
ThreadID | threadId () const |
Tick | readLastActivate () const |
Tick | readLastSuspend () const |
void | initMemProxies (ThreadContext *tc) |
Initialise the physical and virtual port proxies and tie them to the data port of the CPU. More... | |
void | dumpFuncProfile () |
EndQuiesceEvent * | getQuiesceEvent () |
void | profileClear () |
void | profileSample () |
TheISA::Kernel::Statistics * | getKernelStats () |
PortProxy & | getPhysProxy () |
FSTranslatingPortProxy & | getVirtProxy () |
Process * | getProcessPtr () |
void | setProcessPtr (Process *p) |
SETranslatingPortProxy & | getMemProxy () |
Counter | readFuncExeInst () |
Reads the number of instructions functionally executed and committed. More... | |
void | setFuncExeInst (Counter new_val) |
Sets the total number of instructions functionally executed and committed. More... | |
Status | status () const |
Returns the status of this thread. More... | |
void | setStatus (Status new_status) |
Sets the status of this thread. More... | |
Public Member Functions inherited from Serializable | |
Serializable () | |
virtual | ~Serializable () |
void | serializeSection (CheckpointOut &cp, const char *name) const |
Serialize an object into a new section. More... | |
void | serializeSection (CheckpointOut &cp, const std::string &name) const |
void | unserializeSection (CheckpointIn &cp, const char *name) |
Unserialize an a child object. More... | |
void | unserializeSection (CheckpointIn &cp, const std::string &name) |
Public Attributes | |
bool | noSquashFromTC |
bool | trapPending |
Whether or not the thread is currently waiting on a trap, and thus able to be externally updated without squashing. More... | |
ThreadContext * | tc |
Pointer to the ThreadContext of this thread. More... | |
Public Attributes inherited from ThreadState | |
Counter | numInst |
Number of instructions committed. More... | |
Stats::Scalar | numInsts |
Stat for number instructions committed. More... | |
Counter | numOp |
Number of ops (including micro ops) committed. More... | |
Stats::Scalar | numOps |
Stat for number ops (including micro ops) committed. More... | |
Stats::Scalar | numMemRefs |
Stat for number of memory references. More... | |
Counter | numLoad |
Number of simulated loads, used for tracking events based on the number of loads committed. More... | |
Counter | startNumLoad |
The number of simulated loads committed prior to this run. More... | |
Tick | lastActivate |
Last time activate was called on this thread. More... | |
Tick | lastSuspend |
Last time suspend was called on this thread. More... | |
FunctionProfile * | profile |
ProfileNode * | profileNode |
Addr | profilePC |
EndQuiesceEvent * | quiesceEvent |
TheISA::Kernel::Statistics * | kernelStats |
Counter | funcExeInst |
unsigned | storeCondFailures |
Private Attributes | |
O3CPU * | cpu |
Pointer to the CPU. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from Serializable | |
static const std::string & | currentSection () |
Get the fully-qualified name of the active section. More... | |
static void | serializeAll (const std::string &cpt_dir) |
static void | unserializeGlobals (CheckpointIn &cp) |
Static Public Attributes inherited from Serializable | |
static int | ckptCount = 0 |
static int | ckptMaxCount = 0 |
static int | ckptPrevCount = -1 |
Protected Attributes inherited from ThreadState | |
ThreadContext::Status | _status |
BaseCPU * | baseCpu |
ContextID | _contextId |
ThreadID | _threadId |
Process * | process |
PortProxy * | physProxy |
A port proxy outgoing only for functional accesses to physical addresses. More... | |
FSTranslatingPortProxy * | virtProxy |
A translating port proxy, outgoing only, for functional accesse to virtual addresses. More... | |
SETranslatingPortProxy * | proxy |
Class that has various thread state, such as the status, the current instruction being processed, whether or not the thread has a trap pending or is being externally updated, the ThreadContext pointer, etc.
It also handles anything related to a specific thread's process, such as syscalls and checking valid addresses.
typedef Impl::O3CPU O3ThreadState< class >::O3CPU |
Definition at line 70 of file thread_state.hh.
typedef ThreadContext::Status O3ThreadState< class >::Status |
Definition at line 69 of file thread_state.hh.
|
inline |
Definition at line 91 of file thread_state.hh.
Referenced by O3ThreadState< Impl >::O3ThreadState().
|
inline |
Definition at line 148 of file thread_state.hh.
Referenced by O3ThreadState< Impl >::O3ThreadState().
|
inline |
Returns a pointer to the TC of this thread.
Definition at line 140 of file thread_state.hh.
|
inlineoverridevirtual |
Serialize an object.
Output an object's state into the current checkpoint section.
cp | Checkpoint state |
Implements Serializable.
Definition at line 115 of file thread_state.hh.
Referenced by O3ThreadState< Impl >::serialize().
|
inline |
Handles the syscall.
Definition at line 143 of file thread_state.hh.
|
inlineoverridevirtual |
Unserialize an object.
Read an object's state from the current checkpoint section.
cp | Checkpoint state |
Implements Serializable.
Definition at line 123 of file thread_state.hh.
Referenced by O3ThreadState< Impl >::unserialize().
|
private |
Pointer to the CPU.
Definition at line 74 of file thread_state.hh.
Referenced by O3ThreadState< Impl >::dumpFuncProfile(), and O3ThreadState< Impl >::O3ThreadState().
bool O3ThreadState< class >::noSquashFromTC |
Definition at line 84 of file thread_state.hh.
Referenced by O3ThreadContext< class >::conditionalSquash(), and O3ThreadState< Impl >::unserialize().
ThreadContext* O3ThreadState< class >::tc |
Pointer to the ThreadContext of this thread.
Definition at line 137 of file thread_state.hh.
Referenced by O3ThreadState< Impl >::dumpFuncProfile(), O3ThreadState< Impl >::getTC(), O3ThreadState< Impl >::serialize(), O3ThreadState< Impl >::syscall(), and O3ThreadState< Impl >::unserialize().
bool O3ThreadState< class >::trapPending |
Whether or not the thread is currently waiting on a trap, and thus able to be externally updated without squashing.
Definition at line 89 of file thread_state.hh.
Referenced by O3ThreadContext< class >::conditionalSquash().