gem5  v21.0.0.0
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
tarmac_record.cc
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2017-2019 ARM Limited
3  * All rights reserved
4  *
5  * The license below extends only to copyright in the software and shall
6  * not be construed as granting a license to any other intellectual
7  * property including but not limited to intellectual property relating
8  * to a hardware implementation of the functionality of the software
9  * licensed hereunder. You may use the software subject to the license
10  * terms below provided that you ensure that this notice is replicated
11  * unmodified and in its entirety in all distributions of the software,
12  * modified or unmodified, in source code or in binary form.
13  *
14  * Redistribution and use in source and binary forms, with or without
15  * modification, are permitted provided that the following conditions are
16  * met: redistributions of source code must retain the above copyright
17  * notice, this list of conditions and the following disclaimer;
18  * redistributions in binary form must reproduce the above copyright
19  * notice, this list of conditions and the following disclaimer in the
20  * documentation and/or other materials provided with the distribution;
21  * neither the name of the copyright holders nor the names of its
22  * contributors may be used to endorse or promote products derived from
23  * this software without specific prior written permission.
24  *
25  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
26  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
27  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
28  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
29  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
30  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
31  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
32  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
33  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
34  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
35  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36  */
37 
39 
40 #include <memory>
41 
43 #include "tarmac_tracer.hh"
44 
45 using namespace ArmISA;
46 
47 namespace Trace {
48 
49 // TARMAC Instruction Record static variables
50 uint64_t TarmacTracerRecord::TraceInstEntry::instCount = 0;
51 
52 std::string
54 {
55  switch (isetstate) {
56  case TarmacBaseRecord::ISET_ARM:
57  return "A";
58  case TarmacBaseRecord::ISET_THUMB:
59  return "T";
60  case TarmacBaseRecord::ISET_A64:
61  return "O";
62  default:
63  return "Unsupported";
64  }
65 }
66 
67 std::string
69 {
70  switch (opMode) {
71  case MODE_EL0T:
72  return "EL0t";
73  case MODE_EL1T:
74  return "EL1t";
75  case MODE_EL1H:
76  return "EL1h";
77  case MODE_EL2T:
78  return "EL2t";
79  case MODE_EL2H:
80  return "EL2h";
81  case MODE_EL3T:
82  return "EL3t";
83  case MODE_EL3H:
84  return "EL3h";
85  case MODE_USER:
86  return "usr";
87  case MODE_FIQ:
88  return "fiq";
89  case MODE_IRQ:
90  return "irq";
91  case MODE_SVC:
92  return "svc";
93  case MODE_MON:
94  return "mon";
95  case MODE_ABORT:
96  return "abt";
97  case MODE_HYP:
98  return "hyp";
99  case MODE_UNDEFINED:
100  return "und";
101  case MODE_SYSTEM:
102  return "sys";
103  default:
104  return "Unsupported";
105  }
106 }
107 
108 // TarmacTracerRecord ctor
109 TarmacTracerRecord::TarmacTracerRecord(Tick _when, ThreadContext *_thread,
110  const StaticInstPtr _staticInst,
111  PCState _pc,
112  TarmacTracer& _tracer,
113  const StaticInstPtr _macroStaticInst)
114  : TarmacBaseRecord(_when, _thread, _staticInst,
115  _pc, _macroStaticInst),
116  tracer(_tracer)
117 {
118 }
119 
121  const TarmacContext& tarmCtx,
122  bool predicate)
123  : InstEntry(tarmCtx.thread, tarmCtx.pc, tarmCtx.staticInst, predicate)
124 {
125  secureMode = isSecure(tarmCtx.thread);
126 
127  auto arm_inst = static_cast<const ArmStaticInst*>(
128  tarmCtx.staticInst.get()
129  );
130 
131  // Get the instruction size as a number of bits:
132  // (multiply byte size by 8)
133  instSize = (arm_inst->instSize() << 3);
134 
135  // Mask the opcode using the instruction size: the
136  // opcode field will otherwise be 32 bit wide even
137  // for 16bit (Thumb) instruction.
138  opcode = arm_inst->encoding();
139 
140  // Update the instruction count: number of executed
141  // instructions.
142  instCount++;
143 }
144 
146  const TarmacContext& tarmCtx,
147  uint8_t _size, Addr _addr, uint64_t _data)
148  : MemEntry(_size, _addr, _data),
149  loadAccess(tarmCtx.staticInst->isLoad())
150 {
151 }
152 
154  const TarmacContext& tarmCtx,
155  const RegId& reg)
156  : RegEntry(tarmCtx.pc),
157  regValid(false),
158  regClass(reg.classValue()),
159  regRel(reg.index())
160 {
161 }
162 
163 void
165  const TarmacContext& tarmCtx
166 )
167 {
168  // Fill the register entry data, according to register
169  // class.
170  switch (regClass) {
171  case CCRegClass:
172  updateCC(tarmCtx, regRel);
173  break;
174  case FloatRegClass:
175  updateFloat(tarmCtx, regRel);
176  break;
177  case IntRegClass:
178  updateInt(tarmCtx, regRel);
179  break;
180  case MiscRegClass:
181  updateMisc(tarmCtx, regRel);
182  break;
183  case VecRegClass:
184  updateVec(tarmCtx, regRel);
185  break;
186  case VecPredRegClass:
187  updatePred(tarmCtx, regRel);
188  break;
189  default:
190  // If unsupported format, do nothing: non updating
191  // the register will prevent it to be printed.
192  break;
193  }
194 }
195 
196 void
198  const TarmacContext& tarmCtx,
199  RegIndex regRelIdx
200 )
201 {
202  auto thread = tarmCtx.thread;
203 
204  regValid = true;
205  regName = miscRegName[regRelIdx];
206  values[Lo] = thread->readMiscRegNoEffect(regRelIdx);
207 
208  // If it is the CPSR:
209  // update the value of the CPSR register and add
210  // the CC flags on top of the value
211  if (regRelIdx == MISCREG_CPSR) {
213  cpsr.nz = thread->readCCReg(CCREG_NZ);
214  cpsr.c = thread->readCCReg(CCREG_C);
215  cpsr.v = thread->readCCReg(CCREG_V);
216  cpsr.ge = thread->readCCReg(CCREG_GE);
217 
218  // update the entry value
219  values[Lo] = cpsr;
220  }
221 }
222 
223 void
225  const TarmacContext& tarmCtx,
226  RegIndex regRelIdx
227 )
228 {
229  auto thread = tarmCtx.thread;
230 
231  regValid = true;
232  regName = ccRegName[regRelIdx];
233  values[Lo] = thread->readCCReg(regRelIdx);
234 }
235 
236 void
238  const TarmacContext& tarmCtx,
239  RegIndex regRelIdx
240 )
241 {
242  auto thread = tarmCtx.thread;
243 
244  regValid = true;
245  regName = "f" + std::to_string(regRelIdx);
246  values[Lo] = bitsToFloat32(thread->readFloatReg(regRelIdx));
247 }
248 
249 void
251  const TarmacContext& tarmCtx,
252  RegIndex regRelIdx
253 )
254 {
255  auto thread = tarmCtx.thread;
256 
257  // Reading operating mode from CPSR.
258  // This is needed when printing the register name in case
259  // of banked register (e.g. lr_svc)
261  OperatingMode mode = (OperatingMode)(uint8_t)cpsr.mode;
262 
263  std::string reg_suffix;
264  if (mode != MODE_USER) {
265  reg_suffix = "_" + opModeToStr(mode);
266  }
267 
268  regValid = true;
269  switch (regRelIdx) {
270  case PCReg:
271  regName = "pc";
272  break;
273  case StackPointerReg:
274  regName = "sp" + reg_suffix ;
275  break;
276  case FramePointerReg:
277  regName = "fp" + reg_suffix;
278  break;
279  case ReturnAddressReg:
280  regName = "lr" + reg_suffix;
281  break;
282  default:
283  regName = "r" + std::to_string(regRelIdx);
284  break;
285  }
286  values[Lo] = thread->readIntReg(regRelIdx);
287 }
288 
289 void
291  const TarmacContext& tarmCtx)
292 {
293  // Generate an instruction entry in the record and
294  // add it to the Instruction Queue
295  queue.push_back(
296  std::make_unique<TraceInstEntry>(tarmCtx, predicate)
297  );
298 }
299 
300 void
302  const TarmacContext& tarmCtx)
303 {
304  // Generate a memory entry in the record if the record
305  // implies a valid memory access, and add it to the
306  // Memory Queue
307  if (getMemValid()) {
308  queue.push_back(
309  std::make_unique<TraceMemEntry>(tarmCtx,
310  static_cast<uint8_t>(getSize()),
311  getAddr(), getIntData())
312  );
313  }
314 }
315 
316 void
318  const TarmacContext& tarmCtx)
319 {
320  // Generate an entry for every ARM register being
321  // written by the current instruction
322  for (auto reg = 0; reg < staticInst->numDestRegs(); ++reg) {
323 
324  RegId reg_id = staticInst->destRegIdx(reg);
325 
326  // Creating a single register change entry
327  auto single_reg = genRegister<TraceRegEntry>(tarmCtx, reg_id);
328 
329  // Copying the entry and adding it to the "list"
330  // of entries to be dumped to trace.
331  queue.push_back(std::make_unique<TraceRegEntry>(single_reg));
332  }
333 
334  // Gem5 is treating CPSR flags as separate registers (CC registers),
335  // in contrast with Tarmac specification: we need to merge the gem5 CC
336  // entries altogether with the CPSR register and produce a single entry.
337  mergeCCEntry<TraceRegEntry>(queue, tarmCtx);
338 }
339 
340 void
342 {
343  // Generate and print all the record's entries.
344  auto &instQueue = tracer.instQueue;
345  auto &memQueue = tracer.memQueue;
346  auto &regQueue = tracer.regQueue;
347 
348  const TarmacContext tarmCtx(
349  thread,
351  pc
352  );
353 
354  if (!staticInst->isMicroop()) {
355  // Current instruction is NOT a micro-instruction:
356  // Generate Tarmac entries and dump them immediately
357 
358  // Generate Tarmac entries and add them to the respective
359  // queues.
360  addInstEntry(instQueue, tarmCtx);
361  addMemEntry(memQueue, tarmCtx);
362  addRegEntry(regQueue, tarmCtx);
363 
364  // Flush (print) any queued entry.
365  flushQueues(instQueue, memQueue, regQueue);
366 
367  } else {
368  // Current instruction is a micro-instruction:
369  // save micro entries into dedicated queues and flush them
370  // into the tracefile only when the MACRO-instruction
371  // has completed.
372 
373  if (staticInst->isFirstMicroop()) {
374  addInstEntry(instQueue, tarmCtx);
375  }
376 
377  addRegEntry(regQueue, tarmCtx);
378  addMemEntry(memQueue, tarmCtx);
379 
380  if (staticInst->isLastMicroop()) {
381  // Flush (print) any queued entry.
382  flushQueues(instQueue, memQueue, regQueue);
383  }
384  }
385 }
386 
387 template<typename Queue>
388 void
390 {
391  std::ostream &outs = Trace::output();
392 
393  for (const auto &single_entry : queue) {
394  single_entry->print(outs);
395  }
396 
397  queue.clear();
398 }
399 
400 template<typename Queue, typename... Args>
401 void
402 TarmacTracerRecord::flushQueues(Queue& queue, Args & ... args)
403 {
404  flushQueues(queue);
405  flushQueues(args...);
406 }
407 
408 void
410  std::ostream& outs,
411  int verbosity,
412  const std::string &prefix) const
413 {
414  // Pad the opcode
415  std::string opcode_str = csprintf("%0*x", instSize >> 2, opcode);
416 
417  // Print the instruction record formatted according
418  // to the Tarmac specification
419  ccprintf(outs, "%s clk %s (%u) %08x %s %s %s_%s : %s\n",
420  curTick(), /* Tick time */
421  taken? "IT" : "IS", /* Instruction taken/skipped */
422  instCount, /* Instruction count */
423  addr, /* Instruction address */
424  opcode_str, /* Instruction opcode */
425  iSetStateToStr(isetstate), /* Instruction Set */
426  opModeToStr(mode), /* Exception level */
427  secureMode? "s" : "ns", /* Security */
428  disassemble); /* Instruction disass */
429 }
430 
431 void
433  std::ostream& outs,
434  int verbosity,
435  const std::string &prefix) const
436 {
437  // Print the memory record formatted according
438  // to the Tarmac specification
439  ccprintf(outs, "%s clk M%s%d %08x %0*x\n",
440  curTick(), /* Tick time */
441  loadAccess? "R" : "W", /* Access type */
442  size, /* Access size */
443  addr, /* Memory address */
444  size*2, /* Padding with access size */
445  data); /* Memory data */
446 }
447 
448 void
450  std::ostream& outs,
451  int verbosity,
452  const std::string &prefix) const
453 {
454  // Print the register record formatted according
455  // to the Tarmac specification
456  if (regValid)
457  ccprintf(outs, "%s clk R %s %08x\n",
458  curTick(), /* Tick time */
459  regName, /* Register name */
460  values[Lo]); /* Register value */
461 }
462 
463 } // namespace Trace
ThreadContext::readMiscRegNoEffect
virtual RegVal readMiscRegNoEffect(RegIndex misc_reg) const =0
Trace::iSetStateToStr
std::string iSetStateToStr(TarmacBaseRecord::ISetState isetstate)
Returns the string representation of the instruction set being currently run according to the Tarmac ...
Definition: tarmac_record.cc:53
Trace::InstRecord::data
union Trace::InstRecord::@112 data
Trace::TarmacTracerRecord::addInstEntry
virtual void addInstEntry(std::vector< InstPtr > &queue, const TarmacContext &ptr)
Generates an Entry for the executed instruction.
Definition: tarmac_record.cc:290
Trace::InstRecord::addr
Addr addr
The address that was accessed.
Definition: insttracer.hh:80
ArmISA::MODE_HYP
@ MODE_HYP
Definition: types.hh:642
ArmISA::MODE_UNDEFINED
@ MODE_UNDEFINED
Definition: types.hh:643
ArmISA::CCREG_NZ
@ CCREG_NZ
Definition: ccregs.hh:45
ArmISA::MODE_EL0T
@ MODE_EL0T
Definition: types.hh:629
StaticInst::destRegIdx
const RegId & destRegIdx(int i) const
Return logical index (architectural reg num) of i'th destination reg.
Definition: static_inst.hh:234
MipsISA::index
Bitfield< 30, 0 > index
Definition: pra_constants.hh:44
Trace::TarmacTracerRecord::TraceRegEntry::TraceRegEntry
TraceRegEntry(const TarmacContext &tarmCtx, const RegId &reg)
Definition: tarmac_record.cc:153
Trace::InstRecord::staticInst
StaticInstPtr staticInst
Definition: insttracer.hh:65
bitsToFloat32
static float bitsToFloat32(uint32_t val)
Definition: types.hh:204
ArmISA::MODE_EL3H
@ MODE_EL3H
Definition: types.hh:635
Trace::TarmacBaseRecord
Definition: tarmac_base.hh:62
Trace::TarmacTracerRecord::flushQueues
void flushQueues(Queue &queue)
Flush queues to the trace output.
Definition: tarmac_record.cc:389
Trace
Definition: nativetrace.cc:52
ArmISA::OperatingMode
OperatingMode
Definition: types.hh:628
sc_dt::to_string
const std::string to_string(sc_enc enc)
Definition: sc_fxdefs.cc:91
Trace::TarmacTracerRecord::addRegEntry
virtual void addRegEntry(std::vector< RegPtr > &queue, const TarmacContext &ptr)
Generate an Entry for every register being written.
Definition: tarmac_record.cc:317
Trace::InstRecord::getIntData
uint64_t getIntData() const
Definition: insttracer.hh:244
Tick
uint64_t Tick
Tick count type.
Definition: types.hh:59
ArmISA::MODE_SYSTEM
@ MODE_SYSTEM
Definition: types.hh:644
Trace::InstRecord::macroStaticInst
StaticInstPtr macroStaticInst
Definition: insttracer.hh:67
ArmISA::CCREG_V
@ CCREG_V
Definition: ccregs.hh:47
Trace::TarmacTracerRecord::TraceRegEntry::update
void update(const TarmacContext &tarmCtx)
This updates the register entry using the update table.
Definition: tarmac_record.cc:164
ArmISA::MODE_EL1T
@ MODE_EL1T
Definition: types.hh:630
std::vector< InstPtr >
Trace::TarmacTracerRecord::TraceMemEntry::TraceMemEntry
TraceMemEntry(const TarmacContext &tarmCtx, uint8_t _size, Addr _addr, uint64_t _data)
Definition: tarmac_record.cc:145
Trace::TarmacBaseRecord::InstEntry::opcode
ArmISA::MachInst opcode
Definition: tarmac_base.hh:91
Trace::InstRecord::getMemValid
bool getMemValid() const
Definition: insttracer.hh:242
ArmISA::miscRegName
const char *const miscRegName[]
Definition: miscregs.hh:1167
ArmISA
Definition: ccregs.hh:41
X86ISA::reg
Bitfield< 5, 3 > reg
Definition: types.hh:88
Trace::TarmacBaseRecord::InstEntry
TARMAC instruction trace record.
Definition: tarmac_base.hh:81
Trace::TarmacTracerRecord::TraceRegEntry::updateMisc
virtual void updateMisc(const TarmacContext &tarmCtx, RegIndex regRelIdx)
Register update functions.
Definition: tarmac_record.cc:197
Trace::opModeToStr
std::string opModeToStr(OperatingMode opMode)
Returns the string representation of the ARM Operating Mode (CPSR.M[3:0] field) according to the Tarm...
Definition: tarmac_record.cc:68
RegId
Register ID: describe an architectural register with its class and index.
Definition: reg_class.hh:75
ArmISA::ArmStaticInst
Definition: static_inst.hh:60
Trace::InstRecord::pc
TheISA::PCState pc
Definition: insttracer.hh:66
ArmISA::CCREG_GE
@ CCREG_GE
Definition: ccregs.hh:48
ArmISA::CCREG_C
@ CCREG_C
Definition: ccregs.hh:46
ThreadContext::readFloatReg
virtual RegVal readFloatReg(RegIndex reg_idx) const =0
StaticInst::isFirstMicroop
bool isFirstMicroop() const
Definition: static_inst.hh:208
Trace::TarmacTracerRecord::TraceRegEntry::updateFloat
virtual void updateFloat(const TarmacContext &tarmCtx, RegIndex regRelIdx)
Definition: tarmac_record.cc:237
Trace::TarmacTracer::memQueue
std::vector< MemPtr > memQueue
Definition: tarmac_tracer.hh:124
FloatRegClass
@ FloatRegClass
Floating-point register.
Definition: reg_class.hh:54
ThreadContext
ThreadContext is the external interface to all thread state for anything outside of the CPU.
Definition: thread_context.hh:88
Trace::TarmacContext
This object type is encapsulating the informations needed by a Tarmac record to generate it's own ent...
Definition: tarmac_tracer.hh:59
ArmISA::MODE_EL1H
@ MODE_EL1H
Definition: types.hh:631
Trace::TarmacTracerRecord::TraceRegEntry::updateCC
virtual void updateCC(const TarmacContext &tarmCtx, RegIndex regRelIdx)
Definition: tarmac_record.cc:224
StaticInst::numDestRegs
int8_t numDestRegs() const
Number of destination registers.
Definition: static_inst.hh:138
Trace::TarmacTracerRecord::TraceInstEntry::TraceInstEntry
TraceInstEntry(const TarmacContext &tarmCtx, bool predicate)
Definition: tarmac_record.cc:120
MipsISA::pc
Bitfield< 4 > pc
Definition: pra_constants.hh:240
ArmISA::ccRegName
const char *const ccRegName[NUM_CCREGS]
Definition: ccregs.hh:54
ArmISA::mode
Bitfield< 4, 0 > mode
Definition: miscregs_types.hh:70
ArmISA::FramePointerReg
const int FramePointerReg
Definition: registers.hh:105
Trace::TarmacTracerRecord::TraceRegEntry::print
virtual void print(std::ostream &outs, int verbosity=0, const std::string &prefix="") const override
Definition: tarmac_record.cc:449
Trace::TarmacBaseRecord::RegEntry
TARMAC register trace record.
Definition: tarmac_base.hh:98
ArmISA::MODE_SVC
@ MODE_SVC
Definition: types.hh:639
Trace::TarmacTracerRecord::addMemEntry
virtual void addMemEntry(std::vector< MemPtr > &queue, const TarmacContext &ptr)
Generates an Entry for every triggered memory access.
Definition: tarmac_record.cc:301
Trace::TarmacBaseRecord::ISetState
ISetState
ARM instruction set state.
Definition: tarmac_base.hh:74
Trace::TarmacTracerRecord::dump
virtual void dump() override
Definition: tarmac_record.cc:341
VecPredRegClass
@ VecPredRegClass
Definition: reg_class.hh:59
ArmISA::MODE_FIQ
@ MODE_FIQ
Definition: types.hh:637
ArmISA::MODE_EL2T
@ MODE_EL2T
Definition: types.hh:632
Trace::output
std::ostream & output()
Get the ostream from the current global logger.
Definition: trace.cc:75
Addr
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
Definition: types.hh:148
IntRegClass
@ IntRegClass
Integer register.
Definition: reg_class.hh:53
Trace::TarmacContext::staticInst
const StaticInstPtr staticInst
Definition: tarmac_tracer.hh:72
ArmISA::opcode
Bitfield< 24, 21 > opcode
Definition: types.hh:101
Trace::TarmacTracer::instQueue
std::vector< InstPtr > instQueue
Collection of heterogeneous printable entries: could be representing either instructions,...
Definition: tarmac_tracer.hh:123
Sinic::regValid
bool regValid(Addr daddr)
Definition: sinicreg.hh:224
CCRegClass
@ CCRegClass
Condition-code register.
Definition: reg_class.hh:60
Trace::TarmacTracerRecord::TraceInstEntry::secureMode
bool secureMode
True if instruction is executed in secure mode.
Definition: tarmac_record.hh:108
StaticInst::isMicroop
bool isMicroop() const
Definition: static_inst.hh:205
Trace::InstRecord::getAddr
Addr getAddr() const
Definition: insttracer.hh:239
Trace::InstRecord::thread
ThreadContext * thread
Definition: insttracer.hh:62
ThreadContext::readCCReg
virtual RegVal readCCReg(RegIndex reg_idx) const =0
ArmISA::MODE_EL3T
@ MODE_EL3T
Definition: types.hh:634
tarmac_record.hh
StaticInst::isLastMicroop
bool isLastMicroop() const
Definition: static_inst.hh:207
ArmISA::MODE_IRQ
@ MODE_IRQ
Definition: types.hh:638
ArmISA::MODE_ABORT
@ MODE_ABORT
Definition: types.hh:641
MiscRegClass
@ MiscRegClass
Control (misc) register.
Definition: reg_class.hh:61
VecRegClass
@ VecRegClass
Vector Register.
Definition: reg_class.hh:56
Trace::TarmacTracerRecord::tracer
TarmacTracer & tracer
Reference to tracer.
Definition: tarmac_record.hh:266
Trace::InstRecord::size
Addr size
The size of the memory request.
Definition: insttracer.hh:81
tarmac_tracer.hh
ArmISA::MISCREG_CPSR
@ MISCREG_CPSR
Definition: miscregs.hh:57
Trace::TarmacTracerRecord::TraceInstEntry::instSize
uint8_t instSize
Instruction size: 16 for 16-bit Thumb Instruction 32 otherwise (ARM and BigThumb)
Definition: tarmac_record.hh:114
Trace::TarmacTracerRecord::TraceInstEntry::instCount
static uint64_t instCount
Number of instructions being traced.
Definition: tarmac_record.hh:105
ArmISA::StackPointerReg
const int StackPointerReg
Definition: registers.hh:106
MipsISA::PCState
GenericISA::DelaySlotPCState< MachInst > PCState
Definition: types.hh:41
RegIndex
uint16_t RegIndex
Definition: types.hh:52
Trace::InstRecord::getSize
Addr getSize() const
Definition: insttracer.hh:240
static_inst.hh
Queue
A high-level queue interface, to be used by both the MSHR queue and the write buffer.
Definition: queue.hh:66
ccprintf
void ccprintf(cp::Print &print)
Definition: cprintf.hh:127
ArmISA::ReturnAddressReg
const int ReturnAddressReg
Definition: registers.hh:107
ArmISA::MODE_MON
@ MODE_MON
Definition: types.hh:640
ArmISA::PCReg
const int PCReg
Definition: registers.hh:108
RefCountingPtr< StaticInst >
curTick
Tick curTick()
The universal simulation clock.
Definition: cur_tick.hh:43
Trace::TarmacTracerRecord::TraceInstEntry::print
virtual void print(std::ostream &outs, int verbosity=0, const std::string &prefix="") const override
Definition: tarmac_record.cc:409
Trace::TarmacTracerRecord::TraceMemEntry::print
virtual void print(std::ostream &outs, int verbosity=0, const std::string &prefix="") const override
Definition: tarmac_record.cc:432
ArmISA::MODE_USER
@ MODE_USER
Definition: types.hh:636
Trace::TarmacBaseRecord::MemEntry
TARMAC memory access trace record (stores only).
Definition: tarmac_base.hh:117
ThreadContext::readIntReg
virtual RegVal readIntReg(RegIndex reg_idx) const =0
ArmISA::MODE_EL2H
@ MODE_EL2H
Definition: types.hh:633
Trace::TarmacTracer
Tarmac Tracer: this tracer generates a new Tarmac Record for every instruction being executed in gem5...
Definition: tarmac_tracer.hh:82
csprintf
std::string csprintf(const char *format, const Args &...args)
Definition: cprintf.hh:158
Trace::TarmacTracer::regQueue
std::vector< RegPtr > regQueue
Definition: tarmac_tracer.hh:125
Trace::TarmacTracerRecord::TraceRegEntry::updateInt
virtual void updateInt(const TarmacContext &tarmCtx, RegIndex regRelIdx)
Definition: tarmac_record.cc:250
ArmISA::isSecure
bool isSecure(ThreadContext *tc)
Definition: utility.cc:112
Trace::TarmacContext::thread
ThreadContext * thread
Definition: tarmac_tracer.hh:71
Trace::InstRecord::predicate
bool predicate
is the predicate for execution this inst true or false (not execed)?
Definition: insttracer.hh:144
RefCountingPtr::get
T * get() const
Directly access the pointer itself without taking a reference.
Definition: refcnt.hh:224

Generated on Tue Mar 23 2021 19:41:20 for gem5 by doxygen 1.8.17