gem5  v22.0.0.2
Public Member Functions | Protected Types | Protected Attributes | List of all members
gem5::Trace::InstRecord Class Referenceabstract

#include <insttracer.hh>

Inheritance diagram for gem5::Trace::InstRecord:
gem5::Trace::ExeTracerRecord gem5::Trace::InstPBTraceRecord gem5::Trace::IntelTraceRecord gem5::Trace::TarmacBaseRecord gem5::Trace::NativeTraceRecord gem5::Trace::TarmacParserRecord gem5::Trace::TarmacTracerRecord gem5::Trace::TarmacTracerRecordV8

Public Member Functions

 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 (TheISA::VecRegContainer &d)
 
void setData (TheISA::VecPredRegContainer &d)
 
void setFetchSeq (InstSeqNum seq)
 
void setCPSeq (InstSeqNum seq)
 
void setPredicate (bool val)
 
void setFaulting (bool val)
 
virtual void dump ()=0
 
Tick getWhen () const
 
ThreadContextgetThread () const
 
StaticInstPtr getStaticInst () const
 
const PCStateBasegetPCState () 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 Types

enum  DataStatus {
  DataInvalid = 0, DataInt8 = 1, DataInt16 = 2, DataInt32 = 4,
  DataInt64 = 8, DataDouble = 3, DataVec = 5, DataVecPred = 6
}
 

Protected Attributes

Tick when
 
ThreadContextthread
 
StaticInstPtr staticInst
 
std::unique_ptr< PCStateBasepc
 
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 {
   uint64_t   as_int
 
   double   as_double
 
   TheISA::VecRegContainer *   as_vec
 
   TheISA::VecPredRegContainer *   as_pred
 
data = {0}
 
InstSeqNum fetch_seq = 0
 
InstSeqNum cp_seq = 0
 
enum gem5::Trace::InstRecord::DataStatus data_status = 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...
 

Detailed Description

Definition at line 61 of file insttracer.hh.

Constructor & Destructor Documentation

◆ InstRecord()

gem5::Trace::InstRecord::InstRecord ( Tick  _when,
ThreadContext _thread,
const StaticInstPtr  _staticInst,
const PCStateBase _pc,
const StaticInstPtr  _macroStaticInst = nullptr 
)
inline

Definition at line 160 of file insttracer.hh.

◆ ~InstRecord()

virtual gem5::Trace::InstRecord::~InstRecord ( )
inlinevirtual

Definition at line 167 of file insttracer.hh.

References data, data_status, DataVec, and DataVecPred.

Member Function Documentation

◆ dump()

virtual void gem5::Trace::InstRecord::dump ( )
pure virtual

◆ getAddr()

Addr gem5::Trace::InstRecord::getAddr ( ) const
inline

◆ getCpSeq()

InstSeqNum gem5::Trace::InstRecord::getCpSeq ( ) const
inline

Definition at line 289 of file insttracer.hh.

References cp_seq.

◆ getCpSeqValid()

bool gem5::Trace::InstRecord::getCpSeqValid ( ) const
inline

Definition at line 290 of file insttracer.hh.

References cp_seq_valid.

◆ getDataStatus()

int gem5::Trace::InstRecord::getDataStatus ( ) const
inline

Definition at line 284 of file insttracer.hh.

References data_status.

◆ getFaulting()

bool gem5::Trace::InstRecord::getFaulting ( ) const
inline

Definition at line 292 of file insttracer.hh.

References faulting.

◆ getFetchSeq()

InstSeqNum gem5::Trace::InstRecord::getFetchSeq ( ) const
inline

Definition at line 286 of file insttracer.hh.

References fetch_seq.

◆ getFetchSeqValid()

bool gem5::Trace::InstRecord::getFetchSeqValid ( ) const
inline

Definition at line 287 of file insttracer.hh.

References fetch_seq_valid.

◆ getFlags()

unsigned gem5::Trace::InstRecord::getFlags ( ) const
inline

Definition at line 279 of file insttracer.hh.

References flags.

Referenced by gem5::Trace::InstPBTraceRecord::dump().

◆ getFloatData()

double gem5::Trace::InstRecord::getFloatData ( ) const
inline

Definition at line 283 of file insttracer.hh.

References data.

◆ getIntData()

uint64_t gem5::Trace::InstRecord::getIntData ( ) const
inline

◆ getMacroStaticInst()

StaticInstPtr gem5::Trace::InstRecord::getMacroStaticInst ( ) const
inline

Definition at line 275 of file insttracer.hh.

References macroStaticInst.

Referenced by gem5::Trace::ArmNativeTrace::check().

◆ getMemValid()

bool gem5::Trace::InstRecord::getMemValid ( ) const
inline

◆ getPCState()

const PCStateBase& gem5::Trace::InstRecord::getPCState ( ) const
inline

Definition at line 274 of file insttracer.hh.

References pc.

◆ getSize()

Addr gem5::Trace::InstRecord::getSize ( ) const
inline

◆ getStaticInst()

StaticInstPtr gem5::Trace::InstRecord::getStaticInst ( ) const
inline

Definition at line 273 of file insttracer.hh.

References staticInst.

Referenced by gem5::Trace::X86NativeTrace::check(), and gem5::Trace::ArmNativeTrace::check().

◆ getThread()

ThreadContext* gem5::Trace::InstRecord::getThread ( ) const
inline

◆ getWhen()

Tick gem5::Trace::InstRecord::getWhen ( ) const
inline

Definition at line 271 of file insttracer.hh.

References when.

◆ setCPSeq()

void gem5::Trace::InstRecord::setCPSeq ( InstSeqNum  seq)
inline

Definition at line 258 of file insttracer.hh.

References cp_seq, and cp_seq_valid.

◆ setData() [1/12]

void gem5::Trace::InstRecord::setData ( double  d)
inline

Definition at line 230 of file insttracer.hh.

References gem5::ArmISA::d, data, data_status, and DataDouble.

◆ setData() [2/12]

void gem5::Trace::InstRecord::setData ( int16_t  d)
inline

Definition at line 226 of file insttracer.hh.

References gem5::ArmISA::d, and setData().

Referenced by setData().

◆ setData() [3/12]

void gem5::Trace::InstRecord::setData ( int32_t  d)
inline

Definition at line 225 of file insttracer.hh.

References gem5::ArmISA::d, and setData().

Referenced by setData().

◆ setData() [4/12]

void gem5::Trace::InstRecord::setData ( int64_t  d)
inline

Definition at line 224 of file insttracer.hh.

References gem5::ArmISA::d, and setData().

Referenced by setData().

◆ setData() [5/12]

void gem5::Trace::InstRecord::setData ( int8_t  d)
inline

Definition at line 227 of file insttracer.hh.

References gem5::ArmISA::d, and setData().

Referenced by setData().

◆ setData() [6/12]

template<typename T , size_t N>
void gem5::Trace::InstRecord::setData ( std::array< T, N >  d)
inline

◆ setData() [7/12]

void gem5::Trace::InstRecord::setData ( TheISA::VecPredRegContainer &  d)
inline

Definition at line 244 of file insttracer.hh.

References gem5::ArmISA::d, data, data_status, and DataVecPred.

◆ setData() [8/12]

void gem5::Trace::InstRecord::setData ( TheISA::VecRegContainer &  d)
inline

Definition at line 237 of file insttracer.hh.

References gem5::ArmISA::d, data, data_status, and DataVec.

◆ setData() [9/12]

void gem5::Trace::InstRecord::setData ( uint16_t  d)
inline

Definition at line 212 of file insttracer.hh.

References gem5::ArmISA::d, data, data_status, and DataInt16.

◆ setData() [10/12]

void gem5::Trace::InstRecord::setData ( uint32_t  d)
inline

Definition at line 206 of file insttracer.hh.

References gem5::ArmISA::d, data, data_status, and DataInt32.

◆ setData() [11/12]

void gem5::Trace::InstRecord::setData ( uint64_t  d)
inline

Definition at line 200 of file insttracer.hh.

References gem5::ArmISA::d, data, data_status, and DataInt64.

◆ setData() [12/12]

void gem5::Trace::InstRecord::setData ( uint8_t  d)
inline

Definition at line 218 of file insttracer.hh.

References gem5::ArmISA::d, data, data_status, and DataInt8.

◆ setFaulting()

void gem5::Trace::InstRecord::setFaulting ( bool  val)
inline

Definition at line 266 of file insttracer.hh.

References faulting, and gem5::X86ISA::val.

Referenced by gem5::BaseSimpleCPU::traceFault().

◆ setFetchSeq()

void gem5::Trace::InstRecord::setFetchSeq ( InstSeqNum  seq)
inline

Definition at line 251 of file insttracer.hh.

References fetch_seq, and fetch_seq_valid.

◆ setMem()

void gem5::Trace::InstRecord::setMem ( Addr  a,
Addr  s,
unsigned  f 
)
inline

◆ setPredicate()

void gem5::Trace::InstRecord::setPredicate ( bool  val)
inline

◆ setWhen()

void gem5::Trace::InstRecord::setWhen ( Tick  new_when)
inline

Definition at line 178 of file insttracer.hh.

References when.

Member Data Documentation

◆ addr

Addr gem5::Trace::InstRecord::addr = 0
protected

◆ as_double

double gem5::Trace::InstRecord::as_double

Definition at line 103 of file insttracer.hh.

◆ as_int

uint64_t gem5::Trace::InstRecord::as_int

Definition at line 102 of file insttracer.hh.

◆ as_pred

TheISA::VecPredRegContainer* gem5::Trace::InstRecord::as_pred

Definition at line 105 of file insttracer.hh.

◆ as_vec

TheISA::VecRegContainer* gem5::Trace::InstRecord::as_vec

Definition at line 104 of file insttracer.hh.

◆ cp_seq

InstSeqNum gem5::Trace::InstRecord::cp_seq = 0
protected

Definition at line 118 of file insttracer.hh.

Referenced by getCpSeq(), and setCPSeq().

◆ data

union { ... } gem5::Trace::InstRecord::data

◆ faulting

bool gem5::Trace::InstRecord::faulting = false
protected

Did the execution of this instruction fault? (requires ExecFaulting to be enabled)

Definition at line 157 of file insttracer.hh.

Referenced by getFaulting(), and setFaulting().

◆ fetch_seq

InstSeqNum gem5::Trace::InstRecord::fetch_seq = 0
protected

Definition at line 112 of file insttracer.hh.

Referenced by getFetchSeq(), and setFetchSeq().

◆ flags

unsigned gem5::Trace::InstRecord::flags = 0
protected

The flags that were assigned to the request.

Definition at line 88 of file insttracer.hh.

Referenced by getFlags(), gem5::Trace::TarmacParserRecord::readMemNoEffect(), and setMem().

◆ macroStaticInst

StaticInstPtr gem5::Trace::InstRecord::macroStaticInst
protected

◆ pc

std::unique_ptr<PCStateBase> gem5::Trace::InstRecord::pc
protected

◆ predicate

bool gem5::Trace::InstRecord::predicate = true
protected

is the predicate for execution this inst true or false (not execed)?

Definition at line 151 of file insttracer.hh.

Referenced by gem5::Trace::TarmacTracerRecordV8::addInstEntry(), gem5::Trace::TarmacTracerRecord::addInstEntry(), and setPredicate().

◆ size

Addr gem5::Trace::InstRecord::size = 0
protected

◆ staticInst

StaticInstPtr gem5::Trace::InstRecord::staticInst
protected

◆ thread

ThreadContext* gem5::Trace::InstRecord::thread
protected

◆ when

Tick gem5::Trace::InstRecord::when
protected

Definition at line 64 of file insttracer.hh.

Referenced by getWhen(), and setWhen().


The documentation for this class was generated from the following file:

Generated on Thu Jul 28 2022 13:34:20 for gem5 by doxygen 1.8.17