Go to the documentation of this file.
41 #ifndef __CPU_SIMPLE_EXEC_CONTEXT_HH__
42 #define __CPU_SIMPLE_EXEC_CONTEXT_HH__
44 #include "arch/vecregs.hh"
46 #include "config/the_isa.hh"
90 thread->threadId()).c_str()),
92 "Number of instructions committed"),
94 "Number of ops (including micro ops) committed"),
96 "Number of integer alu accesses"),
98 "Number of float alu accesses"),
100 "Number of vector alu accesses"),
102 "Number of times a function call or return occured"),
104 "Number of instructions that are conditional controls"),
106 "Number of integer instructions"),
108 "Number of float instructions"),
110 "Number of vector instructions"),
112 "Number of times the integer registers were read"),
114 "Number of times the integer registers were written"),
116 "Number of times the floating registers were read"),
118 "Number of times the floating registers were written"),
120 "Number of times the vector registers were read"),
122 "Number of times the vector registers were written"),
124 "Number of times the predicate registers were read"),
126 "Number of times the predicate registers were written"),
128 "Number of times the CC registers were read"),
130 "Number of times the CC registers were written"),
132 "Number of times the Misc registers were read"),
134 "Number of times the Misc registers were written"),
136 "Number of memory refs"),
138 "Number of load instructions"),
140 "Number of store instructions"),
142 "Number of idle cycles"),
144 "Number of busy cycles"),
146 "Percentage of non-idle cycles"),
148 "Percentage of idle cycles"),
150 "ICache total stall cycles"),
152 "DCache total stall cycles"),
154 "Number of branches fetched"),
156 "Number of branches predicted as taken"),
158 "Number of branch mispredictions"),
160 "Class of executed instruction."),
191 .
init(enums::Num_OpClass)
412 assert(byte_enable.size() == size);
422 assert(byte_enable.size() == size);
432 assert(byte_enable.size() == size);
568 #endif // __CPU_EXEC_CONTEXT_HH__
This is a simple scalar statistic, like a counter.
virtual Fault initiateMemAMO(Addr addr, unsigned size, Request::Flags flags, AtomicOpFunctorPtr amo_op)
RegVal readMiscReg(RegIndex misc_reg) override
void setMiscReg(int misc_reg, RegVal val) override
Sets a miscellaneous register, handling any architectural side effects due to writing that register.
void * getWritableReg(const RegId &arch_reg) override
statistics::Scalar numMiscRegReads
statistics::Scalar numIntRegWrites
RegVal getReg(const RegId &arch_reg) const override
std::array< statistics::Scalar *, CCRegClass+1 > numRegWrites
int64_t htmTransactionStops
ExecContextStats(BaseSimpleCPU *cpu, SimpleThread *thread)
Trace::InstRecord * traceData
bool readMemAccPredicate() const override
Fault initiateMemMgmtCmd(Request::Flags flags) override
Initiate a memory management command with no valid address.
statistics::Scalar icacheStallCycles
statistics::Scalar numCallsReturns
statistics::Scalar numVecPredRegWrites
void * getWritableRegOperand(const StaticInst *si, int idx) override
statistics::Scalar numVecRegReads
const FlagsType nozero
Don't print if this is zero.
virtual Fault amoMem(Addr addr, uint8_t *data, unsigned size, Request::Flags flags, AtomicOpFunctorPtr amo_op)
void setMiscReg(RegIndex misc_reg, RegVal val) override
gem5::SimpleExecContext::ExecContextStats execContextStats
void setStCondFailures(unsigned sc_failures) override
uint64_t newHtmTransactionUid() const override
RegVal readMiscReg(int misc_reg) override
Reads a miscellaneous register, handling any architectural side effects due to reading that register.
Derived & subname(off_type index, const std::string &name)
Set the subfield name for the given index, and marks this stat to print at the end of simulation.
A stat that calculates the per tick average of a value.
void getRegOperand(const StaticInst *si, int idx, void *val) override
unsigned int readStCondFailures() const override
Returns the number of consecutive store conditional failures.
std::array< statistics::Scalar *, CCRegClass+1 > numRegReads
A vector of scalar stats.
std::string csprintf(const char *format, const Args &...args)
void setPredicate(bool val)
void setReg(const RegId &arch_reg, RegVal val) override
int64_t htmTransactionStarts
The SimpleThread object provides a combination of the ThreadState object and the ThreadContext interf...
statistics::Scalar numPredictedBranches
Number of branches predicted as taken.
statistics::Scalar numVecInsts
uint64_t getHtmTransactionalDepth() const override
const FlagsType dist
Print the distribution.
void setPredicate(bool val) override
const PCStateBase & pcState() const override
Fault amoMem(Addr addr, uint8_t *data, unsigned int size, Request::Flags flags, AtomicOpFunctorPtr amo_op) override
For atomic-mode contexts, perform an atomic AMO (a.k.a., Atomic Read-Modify-Write Memory Operation)
const FlagsType pdf
Print the percent of the total that this entry represents.
unsigned readStCondFailures() const override
virtual Fault writeMem(uint8_t *data, unsigned size, Addr addr, Request::Flags flags, uint64_t *res, const std::vector< bool > &byte_enable=std::vector< bool >())
statistics::Scalar numMiscRegWrites
bool mwait(PacketPtr pkt) override
statistics::Scalar numCCRegReads
void setStCondFailures(unsigned int sc_failures) override
Sets the number of consecutive store conditional failures.
bool readMemAccPredicate()
statistics::Formula numIdleCycles
virtual Fault readMem(Addr addr, uint8_t *data, unsigned size, Request::Flags flags, const std::vector< bool > &byte_enable=std::vector< bool >())
void demapPage(Addr vaddr, uint64_t asn) override
Invalidate a page in the DTLB and ITLB.
Base, ISA-independent static instruction class.
ThreadContext is the external interface to all thread state for anything outside of the CPU.
statistics::Scalar numInsts
std::shared_ptr< FaultBase > Fault
bool readPredicate() const
bool inHtmTransactionalState() const override
#define ADD_STAT(n,...)
Convenience macro to add a stat to a statistics group.
statistics::Scalar numFpRegReads
void mwaitAtomic(ThreadContext *tc) override
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
statistics::Scalar numCCRegWrites
statistics::Scalar numCondCtrlInsts
bool readPredicate() const override
void setMemAccPredicate(bool val)
statistics::Average notIdleFraction
Fault writeMem(uint8_t *data, unsigned int size, Addr addr, Request::Flags flags, uint64_t *res, const std::vector< bool > &byte_enable) override
For atomic-mode contexts, perform an atomic memory write operation.
statistics::Vector statExecutedInstType
int threadId() const override
statistics::Formula numBusyCycles
statistics::Scalar dcacheStallCycles
Counter numInst
PER-THREAD STATS.
virtual BaseHTMCheckpointPtr & getHtmCheckpointPtr()=0
const PCStateBase & pcState() const override
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
statistics::Formula idleFraction
statistics::Scalar numFpInsts
void pcState(const PCStateBase &val) override
statistics::Scalar numVecAluAccesses
void setMiscRegOperand(const StaticInst *si, int idx, RegVal val) override
statistics::Scalar numStoreInsts
Fault initiateMemRead(Addr addr, unsigned int size, Request::Flags flags, const std::vector< bool > &byte_enable) override
Initiate a timing memory read operation.
ThreadContext * getTC()
Returns the pointer to this SimpleThread's ThreadContext.
statistics::Scalar numLoadInsts
virtual Fault initiateMemMgmtCmd(Request::Flags flags)=0
Memory management commands such as hardware transactional memory commands or TLB invalidation command...
statistics::Scalar numIntInsts
statistics::Scalar numIntAluAccesses
void setMemAccPredicate(bool val) override
@ MiscRegClass
Control (misc) register.
Derived & prereq(const Stat &prereq)
Set the prerequisite stat and marks this stat to print at the end of simulation.
void setRegOperand(const StaticInst *si, int idx, RegVal val) override
virtual Fault initiateMemRead(Addr addr, unsigned size, Request::Flags flags, const std::vector< bool > &byte_enable=std::vector< bool >())
Fault initiateMemAMO(Addr addr, unsigned int size, Request::Flags flags, AtomicOpFunctorPtr amo_op) override
For timing-mode contexts, initiate an atomic AMO (atomic read-modify-write memory operation)
void demapPage(Addr vaddr, uint64_t asn)
AddressMonitor * getAddrMonitor() override
double Counter
All counters are of 64-bit values.
ThreadContext * tcBase() const override
Returns a pointer to the ThreadContext.
statistics::Scalar numFpAluAccesses
RegVal readMiscRegOperand(const StaticInst *si, int idx) override
void setRegOperand(const StaticInst *si, int idx, const void *val) override
statistics::Scalar numVecRegWrites
The ExecContext is an abstract base class the provides the interface used by the ISA to manipulate th...
statistics::Scalar numIntRegReads
statistics::Scalar numBranches
statistics::Scalar numOps
statistics::Scalar numFpRegWrites
static const OpClass Num_OpClasses
void armMonitor(Addr address) override
Derived & flags(Flags _flags)
Set the flags and marks this stat to print at the end of simulation.
Fault readMem(Addr addr, uint8_t *data, unsigned int size, Request::Flags flags, const std::vector< bool > &byte_enable) override
Perform an atomic memory read operation.
statistics::Scalar numBranchMispred
Number of misprediced branches.
std::unique_ptr< AtomicOpFunctor > AtomicOpFunctorPtr
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
const FlagsType total
Print the total.
std::unique_ptr< PCStateBase > predPC
Derived & init(size_type size)
Set this vector to have the given size.
uint64_t getHtmTransactionUid() const override
RegVal getRegOperand(const StaticInst *si, int idx) override
statistics::Scalar numVecPredRegReads
void setPredicate(bool val)
statistics::Scalar numMemRefs
SimpleExecContext(BaseSimpleCPU *_cpu, SimpleThread *_thread)
Constructor.
Register ID: describe an architectural register with its class and index.
Generated on Thu Jul 28 2022 13:32:27 for gem5 by doxygen 1.8.17