38 #include "arch/isa_traits.hh"
39 #include "arch/kernel_stats.hh"
40 #include "arch/stacktrace.hh"
41 #include "arch/utility.hh"
46 #include "config/the_isa.hh"
53 #include "params/BaseCPU.hh"
65 Process *_process, TheISA::TLB *_itb,
66 TheISA::TLB *_dtb, TheISA::ISA *_isa)
67 :
ThreadState(_cpu, _thread_num, _process), isa(_isa),
68 predicate(false),
system(_sys),
77 TheISA::TLB *_itb, TheISA::TLB *_dtb,
78 TheISA::ISA *_isa,
bool use_kernel_stats)
88 if (
baseCpu->params()->profile) {
102 if (use_kernel_stats)
214 #if THE_ISA != ALPHA_ISA
void unserialize(CheckpointIn &cp) override
Unserialize an object.
Struct for holding general thread state that is needed across CPU models.
ProfileNode * profileNode
decltype(nullptr) constexpr NoFault
void dump(ThreadContext *tc, std::ostream &out) const
virtual TheISA::Decoder * getDecoderPtr()=0
FunctionProfile * profile
Tick lastActivate
Last time activate was called on this thread.
const std::string & name()
void unserialize(CheckpointIn &cp) override
Unserialize an object.
OutputStream * create(const std::string &name, bool binary=false, bool no_gz=false)
Creates a file in this directory (optionally compressed).
Tick lastSuspend
Last time suspend was called on this thread.
ProxyThreadContext< SimpleThread > * tc
virtual Counter readFuncExeInst()=0
bool simPalCheck(int palFunc)
Check for special simulator handling of specific PAL calls.
bool FullSystem
The FullSystem variable can be used to determine the current mode of simulation.
void activate()
Set the status to Active.
ThreadContext is the external interface to all thread state for anything outside of the CPU...
Event for timing out quiesce instruction.
EndQuiesceEvent * quiesceEvent
void suspend()
Set the status to Suspended.
Tick curTick()
The current simulated tick.
std::string csprintf(const char *format, const Args &...args)
virtual void takeOverFrom(ThreadContext *oldContext)
void close(OutputStream *file)
Closes an output file and free the corresponding OutputFile.
void registerExitCallback(Callback *callback)
Register an exit callback.
void serialize(CheckpointOut &cp) const override
Serialize an object.
SymbolTable * kernelSymtab
kernel symbol table
ThreadContext::Status _status
void halt()
Set the status to Halted.
TheISA::Kernel::Statistics * kernelStats
void regStats(const std::string &name)
std::ostream CheckpointOut
void copyArchRegs(ThreadContext *tc)
void copyState(ThreadContext *oldContext)
virtual int threadId() const =0
virtual int contextId() const =0
TranslatingPortProxy Object Declaration for FS.
TranslatingPortProxy Object Declaration for SE.
virtual Status status() const =0
void copyRegs(ThreadContext *src, ThreadContext *dest)
unsigned storeCondFailures
void serialize(CheckpointOut &cp) const override
Serialize an object.
Helper template class to turn a simple class member function into a callback.
std::shared_ptr< FaultBase > Fault
SimpleThread(BaseCPU *_cpu, int _thread_num, System *_system, TheISA::TLB *_itb, TheISA::TLB *_dtb, TheISA::ISA *_isa, bool use_kernel_stats=true)
virtual TheISA::Kernel::Statistics * getKernelStats()=0