gem5 v25.0.0.1
Loading...
Searching...
No Matches
gem5::trace::InstPBTraceRecord Class Reference

This in an instruction tracer that records the flow of instructions through multiple cpus and systems to a protobuf file specified by proto/inst.proto for further analysis. More...

#include <inst_pb_trace.hh>

Inheritance diagram for gem5::trace::InstPBTraceRecord:
gem5::trace::InstRecord

Public Member Functions

 InstPBTraceRecord (InstPBTrace &_tracer, Tick when, ThreadContext *tc, const StaticInstPtr si, const PCStateBase &pc, const StaticInstPtr mi=NULL)
void dump () override
 called by the cpu when the instruction commits.
Public Member Functions inherited from gem5::trace::InstRecord
 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 &reg_class, RegVal val)
void setData (const RegClass &reg_class, const void *val)
void setFetchSeq (InstSeqNum seq)
void setCPSeq (InstSeqNum seq)
void setPredicate (bool val)
void setFaulting (bool val)
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 Attributes

InstPBTracetracer
Protected Attributes inherited from gem5::trace::InstRecord
Tick when
ThreadContextthread
StaticInstPtr staticInst
std::unique_ptr< PCStateBasepc
StaticInstPtr macroStaticInst
Addr addr = 0
 The address that was accessed.
Addr size = 0
 The size of the memory request.
unsigned flags = 0
 The flags that were assigned to the request.
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
 Are the memory fields in the record valid?
bool fetch_seq_valid = false
 Are the fetch sequence number fields valid?
bool cp_seq_valid = false
 Are the commit sequence number fields valid?
bool predicate = true
 is the predicate for execution this inst true or false (not execed)?
bool faulting = false
 Did the execution of this instruction fault?

Additional Inherited Members

Protected Types inherited from gem5::trace::InstRecord
enum  DataStatus {
  DataInvalid = 0 , DataInt8 = 1 , DataInt16 = 2 , DataInt32 = 4 ,
  DataInt64 = 8 , DataDouble = 3 , DataReg = 5
}
 What size of data was written? More...

Detailed Description

This in an instruction tracer that records the flow of instructions through multiple cpus and systems to a protobuf file specified by proto/inst.proto for further analysis.

Definition at line 66 of file inst_pb_trace.hh.

Constructor & Destructor Documentation

◆ InstPBTraceRecord()

gem5::trace::InstPBTraceRecord::InstPBTraceRecord ( InstPBTrace & _tracer,
Tick when,
ThreadContext * tc,
const StaticInstPtr si,
const PCStateBase & pc,
const StaticInstPtr mi = NULL )
inline

Member Function Documentation

◆ dump()

void gem5::trace::InstPBTraceRecord::dump ( )
overridevirtual

Member Data Documentation

◆ tracer

InstPBTrace& gem5::trace::InstPBTraceRecord::tracer
protected

Definition at line 82 of file inst_pb_trace.hh.

Referenced by dump(), and InstPBTraceRecord().


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

Generated on Sat Oct 18 2025 08:07:04 for gem5 by doxygen 1.14.0