gem5
[DEVELOP-FOR-23.0]
|
TarmacTracer Record: Record generated by the TarmacTracer for every executed instruction. More...
#include <tarmac_record.hh>
Classes | |
struct | TraceInstEntry |
Instruction Entry. More... | |
struct | TraceMemEntry |
Memory Entry. More... | |
struct | TraceRegEntry |
Register Entry. More... | |
Public Types | |
using | InstPtr = std::unique_ptr< TraceInstEntry > |
using | MemPtr = std::unique_ptr< TraceMemEntry > |
using | RegPtr = std::unique_ptr< TraceRegEntry > |
![]() | |
enum | TarmacRecordType { TARMAC_INST, TARMAC_REG, TARMAC_MEM, TARMAC_UNSUPPORTED } |
TARMAC trace record type. More... | |
enum | ISetState { ISET_ARM, ISET_THUMB, ISET_A64, ISET_UNSUPPORTED } |
ARM instruction set state. More... | |
enum | RegType { REG_R, REG_X, REG_S, REG_D, REG_P, REG_Q, REG_Z, REG_MISC } |
ARM register type. More... | |
Public Member Functions | |
TarmacTracerRecord (Tick _when, ThreadContext *_thread, const StaticInstPtr _staticInst, const PCStateBase &_pc, TarmacTracer &_tracer, const StaticInstPtr _macroStaticInst=NULL) | |
virtual void | dump () override |
![]() | |
TarmacBaseRecord (Tick _when, ThreadContext *_thread, const StaticInstPtr _staticInst, const PCStateBase &_pc, const StaticInstPtr _macroStaticInst=nullptr) | |
![]() | |
InstRecord (Tick _when, ThreadContext *_thread, const StaticInstPtr _staticInst, const PCStateBase &_pc, const StaticInstPtr _macroStaticInst=nullptr) | |
virtual | ~InstRecord () |
void | setWhen (Tick new_when) |
void | setMem (Addr a, Addr s, unsigned f) |
template<typename T , size_t N> | |
void | setData (std::array< T, N > d) |
void | setData (uint64_t d) |
void | setData (uint32_t d) |
void | setData (uint16_t d) |
void | setData (uint8_t d) |
void | setData (int64_t d) |
void | setData (int32_t d) |
void | setData (int16_t d) |
void | setData (int8_t d) |
void | setData (double d) |
void | setData (const RegClass ®_class, RegVal val) |
void | setData (const RegClass ®_class, const void *val) |
void | setFetchSeq (InstSeqNum seq) |
void | setCPSeq (InstSeqNum seq) |
void | setPredicate (bool val) |
void | setFaulting (bool val) |
Tick | getWhen () const |
ThreadContext * | getThread () const |
StaticInstPtr | getStaticInst () const |
const PCStateBase & | getPCState () const |
StaticInstPtr | getMacroStaticInst () const |
Addr | getAddr () const |
Addr | getSize () const |
unsigned | getFlags () const |
bool | getMemValid () const |
uint64_t | getIntData () const |
double | getFloatData () const |
int | getDataStatus () const |
InstSeqNum | getFetchSeq () const |
bool | getFetchSeqValid () const |
InstSeqNum | getCpSeq () const |
bool | getCpSeqValid () const |
bool | getFaulting () const |
Protected Member Functions | |
virtual void | addInstEntry (std::vector< InstPtr > &queue, const TarmacContext &ptr) |
Generates an Entry for the executed instruction. More... | |
virtual void | addMemEntry (std::vector< MemPtr > &queue, const TarmacContext &ptr) |
Generates an Entry for every triggered memory access. More... | |
virtual void | addRegEntry (std::vector< RegPtr > &queue, const TarmacContext &ptr) |
Generate an Entry for every register being written. More... | |
template<typename RegEntry > | |
RegEntry | genRegister (const TarmacContext &tarmCtx, const RegId ®) |
Generate and update a register entry. More... | |
template<typename RegEntry > | |
void | mergeCCEntry (std::vector< RegPtr > &queue, const TarmacContext &tarmCtx) |
template<typename Queue > | |
void | flushQueues (Queue &queue) |
Flush queues to the trace output. More... | |
template<typename Queue , typename... Args> | |
void | flushQueues (Queue &queue, Args &... args) |
Protected Attributes | |
TarmacTracer & | tracer |
Reference to tracer. More... | |
![]() | |
Tick | when |
ThreadContext * | thread |
StaticInstPtr | staticInst |
std::unique_ptr< PCStateBase > | pc |
StaticInstPtr | macroStaticInst |
Addr | addr = 0 |
The address that was accessed. More... | |
Addr | size = 0 |
The size of the memory request. More... | |
unsigned | flags = 0 |
The flags that were assigned to the request. More... | |
union gem5::trace::InstRecord::Data | data |
InstSeqNum | fetch_seq = 0 |
InstSeqNum | cp_seq = 0 |
enum gem5::trace::InstRecord::DataStatus | dataStatus = DataInvalid |
bool | mem_valid = false |
bool | fetch_seq_valid = false |
bool | cp_seq_valid = false |
bool | predicate = true |
is the predicate for execution this inst true or false (not execed)? More... | |
bool | faulting = false |
Did the execution of this instruction fault? (requires ExecFaulting to be enabled) More... | |
Additional Inherited Members | |
![]() | |
static ISetState | pcToISetState (const PCStateBase &pc) |
Returns the Instruction Set State according to the current PCState. More... | |
![]() | |
enum | DataStatus { DataInvalid = 0, DataInt8 = 1, DataInt16 = 2, DataInt32 = 4, DataInt64 = 8, DataDouble = 3, DataReg = 5 } |
TarmacTracer Record: Record generated by the TarmacTracer for every executed instruction.
The record is composed by a set of entries, matching the tracing capabilities provided by the Tarmac specifications:
Definition at line 94 of file tarmac_record.hh.
using gem5::trace::TarmacTracerRecord::InstPtr = std::unique_ptr<TraceInstEntry> |
Definition at line 183 of file tarmac_record.hh.
using gem5::trace::TarmacTracerRecord::MemPtr = std::unique_ptr<TraceMemEntry> |
Definition at line 184 of file tarmac_record.hh.
using gem5::trace::TarmacTracerRecord::RegPtr = std::unique_ptr<TraceRegEntry> |
Definition at line 185 of file tarmac_record.hh.
gem5::trace::TarmacTracerRecord::TarmacTracerRecord | ( | Tick | _when, |
ThreadContext * | _thread, | ||
const StaticInstPtr | _staticInst, | ||
const PCStateBase & | _pc, | ||
TarmacTracer & | _tracer, | ||
const StaticInstPtr | _macroStaticInst = NULL |
||
) |
Definition at line 112 of file tarmac_record.cc.
|
protectedvirtual |
Generates an Entry for the executed instruction.
Reimplemented in gem5::trace::TarmacTracerRecordV8.
Definition at line 276 of file tarmac_record.cc.
References gem5::trace::InstRecord::predicate.
Referenced by dump().
|
protectedvirtual |
Generates an Entry for every triggered memory access.
Reimplemented in gem5::trace::TarmacTracerRecordV8.
Definition at line 287 of file tarmac_record.cc.
References gem5::trace::InstRecord::getAddr(), gem5::trace::InstRecord::getIntData(), gem5::trace::InstRecord::getMemValid(), and gem5::trace::InstRecord::getSize().
Referenced by dump().
|
protectedvirtual |
Generate an Entry for every register being written.
Reimplemented in gem5::trace::TarmacTracerRecordV8.
Definition at line 303 of file tarmac_record.cc.
References gem5::StaticInst::destRegIdx(), gem5::StaticInst::numDestRegs(), gem5::X86ISA::reg, and gem5::trace::InstRecord::staticInst.
Referenced by dump().
|
overridevirtual |
Implements gem5::trace::TarmacBaseRecord.
Definition at line 327 of file tarmac_record.cc.
References addInstEntry(), addMemEntry(), addRegEntry(), flushQueues(), gem5::trace::TarmacTracer::instQueue, gem5::StaticInst::isFirstMicroop(), gem5::StaticInst::isLastMicroop(), gem5::StaticInst::isMicroop(), gem5::trace::InstRecord::macroStaticInst, gem5::trace::TarmacTracer::memQueue, gem5::trace::InstRecord::pc, gem5::trace::TarmacTracer::regQueue, gem5::trace::InstRecord::staticInst, gem5::trace::InstRecord::thread, and tracer.
|
protected |
Flush queues to the trace output.
Definition at line 375 of file tarmac_record.cc.
References gem5::trace::TarmacTracer::output(), and tracer.
Referenced by dump(), and flushQueues().
|
protected |
Definition at line 388 of file tarmac_record.cc.
References flushQueues().
|
inlineprotected |
Generate and update a register entry.
Definition at line 204 of file tarmac_record.hh.
References gem5::X86ISA::reg.
|
inlineprotected |
Definition at line 214 of file tarmac_record.hh.
References gem5::ArmISA::MISCREG_CPSR, gem5::MiscRegClass, gem5::ArmISA::miscRegClass, and gem5::X86ISA::reg.
|
protected |
Reference to tracer.
Definition at line 258 of file tarmac_record.hh.
Referenced by dump(), and flushQueues().