29#ifndef __CPU_THREAD_STATE_HH__
30#define __CPU_THREAD_STATE_HH__
uint32_t socketId() const
Reads this CPU's Socket ID.
int cpuId() const
Reads this CPU's ID.
Basic support for object serialization.
This is a simple scalar statistic, like a counter.
double Counter
All counters are of 64-bit values.
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
int16_t ThreadID
Thread index/ID type.
std::ostream CheckpointOut
uint64_t Tick
Tick count type.
int ContextID
Globally unique thread context ID.
statistics::Scalar numOps
Stat for number ops (including micro ops) committed.
statistics::Scalar numMemRefs
Stat for number of memory references.
ThreadStateStats(BaseCPU *cpu, const ThreadID &thread)
statistics::Scalar numInsts
Stat for number instructions committed.
Struct for holding general thread state that is needed across CPU models.
ThreadState(BaseCPU *cpu, ThreadID _tid, Process *_process)
Counter numInst
Number of instructions committed.
ThreadID threadId() const
void serialize(CheckpointOut &cp) const override
Serialize an object.
void setStatus(Status new_status)
Sets the status of this thread.
Tick readLastActivate() const
ThreadContext::Status Status
unsigned storeCondFailures
Counter startNumLoad
The number of simulated loads committed prior to this run.
Tick readLastSuspend() const
void setProcessPtr(Process *p)
Counter numLoad
Number of simulated loads, used for tracking events based on the number of loads committed.
Counter numOp
Number of ops (including micro ops) committed.
gem5::ThreadState::ThreadStateStats threadStats
uint32_t socketId() const
ContextID contextId() const
ThreadContext::Status _status
void setContextId(ContextID id)
Tick lastSuspend
Last time suspend was called on this thread.
Tick lastActivate
Last time activate was called on this thread.
virtual ~ThreadState()=default
Process * getProcessPtr()
Status status() const
Returns the status of this thread.
void setThreadId(ThreadID id)
void unserialize(CheckpointIn &cp) override
Unserialize an object.