50 #include "arch/isa_traits.hh" 51 #include "arch/kernel_stats.hh" 52 #include "arch/stacktrace.hh" 53 #include "arch/utility.hh" 58 #include "config/the_isa.hh" 65 #include "params/BaseCPU.hh" 78 BaseTLB *_dtb, TheISA::ISA *_isa)
79 :
ThreadState(_cpu, _thread_num, _process), isa(_isa),
80 predicate(true), memAccPredicate(true),
81 comInstEventQueue(
"instruction-based event queue"),
90 TheISA::ISA *_isa,
bool use_kernel_stats)
114 if (use_kernel_stats)
void halt() override
Set the status to Halted.
void unserialize(CheckpointIn &cp) override
Unserialize an object.
Struct for holding general thread state that is needed across CPU models.
ProfileNode * profileNode
void suspend() override
Set the status to Suspended.
Status status() const override
virtual TheISA::Decoder * getDecoderPtr()=0
FunctionProfile * profile
Tick lastActivate
Last time activate was called on this thread.
SimpleThread(BaseCPU *_cpu, int _thread_num, System *_system, BaseTLB *_itb, BaseTLB *_dtb, TheISA::ISA *_isa, bool use_kernel_stats=true)
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).
virtual ::Kernel::Statistics * getKernelStats()=0
void dumpFuncProfile() override
Tick lastSuspend
Last time suspend was called on this thread.
virtual void activateContext(ThreadID thread_num)
Notify the CPU that the indicated context is now active.
void clearArchRegs() override
bool FullSystem
The FullSystem variable can be used to determine the current mode of simulation.
virtual void regStats(const std::string &name)
Overload hash function for BasicBlockRange type.
void takeOverFrom(ThreadContext *oldContext) override
ThreadContext is the external interface to all thread state for anything outside of the CPU...
Event for timing out quiesce instruction.
EndQuiesceEvent * quiesceEvent
Tick curTick()
The current simulated tick.
std::string csprintf(const char *format, const Args &...args)
void activate() override
Set the status to Active.
void dump(ThreadContext *tc, std::ostream &out) const
virtual Counter readFuncExeInst() const =0
Kernel::Statistics * kernelStats
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.
virtual const std::string name() const
SymbolTable * kernelSymtab
kernel symbol table
ThreadContext::Status _status
bool predicate
Did this instruction execute or is it predicated false.
bool memAccPredicate
True if the memory access should be skipped for this instruction.
std::ostream CheckpointOut
void copyState(ThreadContext *oldContext)
void regStats(const std::string &name) override
virtual int threadId() const =0
void copyArchRegs(ThreadContext *tc) override
TranslatingPortProxy Object Declaration for FS.
virtual ContextID contextId() const =0
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.
virtual void haltContext(ThreadID thread_num)
Notify the CPU that the indicated context is now halted.
Helper template class to turn a simple class member function into a callback.
EventQueue comInstEventQueue
An instruction-based event queue.
const Params * params() const
virtual void suspendContext(ThreadID thread_num)
Notify the CPU that the indicated context is now suspended.