Go to the documentation of this file.
43 #ifndef __ARCH_ARM_TRACERS_TARMAC_RECORD_HH__
44 #define __ARCH_ARM_TRACERS_TARMAC_RECORD_HH__
48 #include "config/the_isa.hh"
97 virtual void print(std::ostream& outs,
99 const std::string &prefix =
"")
const override;
132 virtual void print(std::ostream& outs,
134 const std::string &prefix =
"")
const override;
172 uint8_t _size,
Addr _addr, uint64_t _data);
174 virtual void print(std::ostream& outs,
176 const std::string &prefix =
"")
const override;
189 virtual void dump()
override;
191 using InstPtr = std::unique_ptr<TraceInstEntry>;
192 using MemPtr = std::unique_ptr<TraceMemEntry>;
193 using RegPtr = std::unique_ptr<TraceRegEntry>;
210 template<
typename RegEntry>
215 single_reg.update(tarmCtx);
220 template<
typename RegEntry>
225 auto it = std::remove_if(
226 queue.begin(), queue.end(),
227 [] (
RegPtr&
reg) ->bool { return (reg->regClass == CCRegClass); }
230 if (it != queue.end()) {
232 queue.erase(it, queue.end());
241 auto cpsr_it = std::find_if(
242 queue.begin(), queue.end(), is_cpsr
246 if (cpsr_it == queue.end()) {
249 m5::make_unique<RegEntry>(
250 genRegister<RegEntry>(tarmCtx,
reg))
257 template<
typename Queue>
259 template<
typename Queue,
typename... Args>
269 #endif // __ARCH_ARM_TRACERS_TARMAC_RECORD_HH__
std::string iSetStateToStr(TarmacBaseRecord::ISetState isetstate)
Returns the string representation of the instruction set being currently run according to the Tarmac ...
std::unique_ptr< TraceRegEntry > RegPtr
virtual void addInstEntry(std::vector< InstPtr > &queue, const TarmacContext &ptr)
Generates an Entry for the executed instruction.
TarmacTracerRecord(Tick _when, ThreadContext *_thread, const StaticInstPtr _staticInst, ArmISA::PCState _pc, TarmacTracer &_tracer, const StaticInstPtr _macroStaticInst=NULL)
bool regValid
True if register entry is valid.
TraceRegEntry(const TarmacContext &tarmCtx, const RegId ®)
std::unique_ptr< TraceMemEntry > MemPtr
void flushQueues(Queue &queue)
Flush queues to the trace output.
virtual void addRegEntry(std::vector< RegPtr > &queue, const TarmacContext &ptr)
Generate an Entry for every register being written.
uint64_t Tick
Tick count type.
void update(const TarmacContext &tarmCtx)
This updates the register entry using the update table.
virtual void updatePred(const TarmacContext &tarmCtx, RegIndex regRelIdx)
TraceMemEntry(const TarmacContext &tarmCtx, uint8_t _size, Addr _addr, uint64_t _data)
TARMAC instruction trace record.
virtual void updateMisc(const TarmacContext &tarmCtx, RegIndex regRelIdx)
Register update functions.
std::string opModeToStr(OperatingMode opMode)
Returns the string representation of the ARM Operating Mode (CPSR.M[3:0] field) according to the Tarm...
Register ID: describe an architectural register with its class and index.
void mergeCCEntry(std::vector< RegPtr > &queue, const TarmacContext &tarmCtx)
virtual void updateFloat(const TarmacContext &tarmCtx, RegIndex regRelIdx)
ThreadContext is the external interface to all thread state for anything outside of the CPU.
This object type is encapsulating the informations needed by a Tarmac record to generate it's own ent...
virtual void updateCC(const TarmacContext &tarmCtx, RegIndex regRelIdx)
TraceInstEntry(const TarmacContext &tarmCtx, bool predicate)
std::string regName
Register name to be printed.
RegClass
Enumerate the classes of registers.
virtual void print(std::ostream &outs, int verbosity=0, const std::string &prefix="") const override
TARMAC register trace record.
Abstract base class for objects which support being printed to a stream for debugging.
virtual void addMemEntry(std::vector< MemPtr > &queue, const TarmacContext &ptr)
Generates an Entry for every triggered memory access.
ISetState
ARM instruction set state.
virtual void dump() override
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
bool secureMode
True if instruction is executed in secure mode.
RegClass regClass
Register class.
RegEntry genRegister(const TarmacContext &tarmCtx, const RegId ®)
Generate and update a register entry.
@ MiscRegClass
Control (misc) register.
TarmacTracer & tracer
Reference to tracer.
TarmacTracer Record: Record generated by the TarmacTracer for every executed instruction.
bool loadAccess
True if memory access is a load.
uint8_t instSize
Instruction size: 16 for 16-bit Thumb Instruction 32 otherwise (ARM and BigThumb)
static uint64_t instCount
Number of instructions being traced.
RegIndex regRel
Register arch number.
GenericISA::DelaySlotPCState< MachInst > PCState
A high-level queue interface, to be used by both the MSHR queue and the write buffer.
virtual void print(std::ostream &outs, int verbosity=0, const std::string &prefix="") const override
virtual void print(std::ostream &outs, int verbosity=0, const std::string &prefix="") const override
TARMAC memory access trace record (stores only).
Tarmac Tracer: this tracer generates a new Tarmac Record for every instruction being executed in gem5...
virtual void updateInt(const TarmacContext &tarmCtx, RegIndex regRelIdx)
virtual void updateVec(const TarmacContext &tarmCtx, RegIndex regRelIdx)
bool predicate
is the predicate for execution this inst true or false (not execed)?
std::unique_ptr< TraceInstEntry > InstPtr
Generated on Wed Sep 30 2020 14:02:01 for gem5 by doxygen 1.8.17