gem5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Member Functions | Public Attributes | Private Attributes | List of all members
O3ThreadState< class > Struct Template Reference

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>

Inheritance diagram for O3ThreadState< class >:
ThreadState Serializable

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...
 
ThreadContextgetTC ()
 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 ()
 
EndQuiesceEventgetQuiesceEvent ()
 
void profileClear ()
 
void profileSample ()
 
TheISA::Kernel::Statistics * getKernelStats ()
 
PortProxygetPhysProxy ()
 
FSTranslatingPortProxygetVirtProxy ()
 
ProcessgetProcessPtr ()
 
void setProcessPtr (Process *p)
 
SETranslatingPortProxygetMemProxy ()
 
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...
 
ThreadContexttc
 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...
 
FunctionProfileprofile
 
ProfileNodeprofileNode
 
Addr profilePC
 
EndQuiesceEventquiesceEvent
 
TheISA::Kernel::Statistics * kernelStats
 
Counter funcExeInst
 
unsigned storeCondFailures
 

Private Attributes

O3CPUcpu
 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
 
BaseCPUbaseCpu
 
ContextID _contextId
 
ThreadID _threadId
 
Processprocess
 
PortProxyphysProxy
 A port proxy outgoing only for functional accesses to physical addresses. More...
 
FSTranslatingPortProxyvirtProxy
 A translating port proxy, outgoing only, for functional accesse to virtual addresses. More...
 
SETranslatingPortProxyproxy
 

Detailed Description

template<class>
struct O3ThreadState< class >

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.

Definition at line 58 of file commit.hh.

Member Typedef Documentation

template<class >
typedef Impl::O3CPU O3ThreadState< class >::O3CPU

Definition at line 70 of file thread_state.hh.

template<class >
typedef ThreadContext::Status O3ThreadState< class >::Status

Definition at line 69 of file thread_state.hh.

Constructor & Destructor Documentation

template<class >
O3ThreadState< class >::O3ThreadState ( O3CPU _cpu,
int  _thread_num,
Process _process 
)
inline

Definition at line 91 of file thread_state.hh.

Referenced by O3ThreadState< Impl >::O3ThreadState().

Member Function Documentation

template<class >
void O3ThreadState< class >::dumpFuncProfile ( )
inline

Definition at line 148 of file thread_state.hh.

Referenced by O3ThreadState< Impl >::O3ThreadState().

template<class >
ThreadContext* O3ThreadState< class >::getTC ( )
inline

Returns a pointer to the TC of this thread.

Definition at line 140 of file thread_state.hh.

template<class >
void O3ThreadState< class >::serialize ( CheckpointOut cp) const
inlineoverridevirtual

Serialize an object.

Output an object's state into the current checkpoint section.

Parameters
cpCheckpoint state

Implements Serializable.

Definition at line 115 of file thread_state.hh.

Referenced by O3ThreadState< Impl >::serialize().

template<class >
void O3ThreadState< class >::syscall ( int64_t  callnum,
Fault fault 
)
inline

Handles the syscall.

Definition at line 143 of file thread_state.hh.

template<class >
void O3ThreadState< class >::unserialize ( CheckpointIn cp)
inlineoverridevirtual

Unserialize an object.

Read an object's state from the current checkpoint section.

Parameters
cpCheckpoint state

Implements Serializable.

Definition at line 123 of file thread_state.hh.

Referenced by O3ThreadState< Impl >::unserialize().

Member Data Documentation

template<class >
O3CPU* O3ThreadState< class >::cpu
private

Pointer to the CPU.

Definition at line 74 of file thread_state.hh.

Referenced by O3ThreadState< Impl >::dumpFuncProfile(), and O3ThreadState< Impl >::O3ThreadState().

template<class >
bool O3ThreadState< class >::noSquashFromTC
template<class >
ThreadContext* O3ThreadState< class >::tc
template<class >
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().


The documentation for this struct was generated from the following files:

Generated on Fri Jun 9 2017 13:04:16 for gem5 by doxygen 1.8.6