|
gem5
v19.0.0.0
|
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 (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 () |
| Kernel::Statistics * | getKernelStats () |
| PortProxy & | getPhysProxy () |
| PortProxy & | getVirtProxy () |
| Process * | getProcessPtr () |
| void | setProcessPtr (Process *p) |
| Counter | readFuncExeInst () const |
| 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 | |
| PCEventQueue | pcEventQueue |
| EventQueue | comInstEventQueue |
| An instruction-based event queue. More... | |
| 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 |
| 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... | |
| PortProxy * | virtProxy |
| A translating port proxy, outgoing only, for functional accesse to virtual addresses. More... | |
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< Impl >::O3CPU |
Definition at line 70 of file thread_state.hh.
| typedef ThreadContext::Status O3ThreadState< Impl >::Status |
Definition at line 69 of file thread_state.hh.
|
inline |
Definition at line 99 of file thread_state.hh.
References O3ThreadState< Impl >::dumpFuncProfile(), FullSystem, ThreadState::profile, ThreadState::profileNode, ThreadState::profilePC, and registerExitCallback().
|
inline |
Definition at line 156 of file thread_state.hh.
References OutputDirectory::close(), OutputDirectory::create(), csprintf(), FunctionProfile::dump(), X86ISA::os, ThreadState::profile, and simout.
Referenced by O3ThreadState< Impl >::O3ThreadState().
|
inline |
Returns a pointer to the TC of this thread.
Definition at line 148 of file thread_state.hh.
References O3ThreadState< Impl >::tc.
|
inlineoverridevirtual |
Serialize an object.
Output an object's state into the current checkpoint section.
| cp | Checkpoint state |
Implements Serializable.
Definition at line 123 of file thread_state.hh.
References ThreadState::serialize(), and O3ThreadState< Impl >::tc.
|
inline |
Handles the syscall.
Definition at line 151 of file thread_state.hh.
References ThreadState::process, and Process::syscall().
|
inlineoverridevirtual |
Unserialize an object.
Read an object's state from the current checkpoint section.
| cp | Checkpoint state |
Implements Serializable.
Definition at line 131 of file thread_state.hh.
References O3ThreadState< Impl >::tc, and ThreadState::unserialize().
| EventQueue O3ThreadState< Impl >::comInstEventQueue |
An instruction-based event queue.
Used for scheduling events based on number of instructions committed.
Definition at line 82 of file thread_state.hh.
|
private |
Pointer to the CPU.
Definition at line 74 of file thread_state.hh.
| bool O3ThreadState< Impl >::noSquashFromTC |
Definition at line 92 of file thread_state.hh.
Referenced by O3ThreadContext< Impl >::conditionalSquash().
| PCEventQueue O3ThreadState< Impl >::pcEventQueue |
Definition at line 77 of file thread_state.hh.
| ThreadContext* O3ThreadState< Impl >::tc |
Pointer to the ThreadContext of this thread.
Definition at line 145 of file thread_state.hh.
Referenced by O3ThreadState< Impl >::getTC(), O3ThreadState< Impl >::serialize(), and O3ThreadState< Impl >::unserialize().
| bool O3ThreadState< Impl >::trapPending |
Whether or not the thread is currently waiting on a trap, and thus able to be externally updated without squashing.
Definition at line 97 of file thread_state.hh.
Referenced by O3ThreadContext< Impl >::conditionalSquash().