sim: Add faulting flag to instruction tracing interface
This patch adds a faulting flag to InstRecord. This allows tracers to identify that the traced instruction has faulted, when ExecFaulting is enabled. It can be set with InstRecord::setFaulting() and read with Instrecord::getFaulting(). Change-Id: I390392d59de930533eab101e96dc4d3c76500748 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/30134 Reviewed-by: Jason Lowe-Power <power.jg@gmail.com> Maintainer: Jason Lowe-Power <power.jg@gmail.com> Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
committed by
Giacomo Travaglini
parent
a1b6471fe5
commit
3853d78594
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2014, 2017 ARM Limited
|
||||
* Copyright (c) 2014, 2017, 2020 ARM Limited
|
||||
* All rights reserved
|
||||
*
|
||||
* The license below extends only to copyright in the software and shall
|
||||
@@ -143,6 +143,12 @@ class InstRecord
|
||||
*/
|
||||
bool predicate;
|
||||
|
||||
/**
|
||||
* Did the execution of this instruction fault? (requires ExecFaulting
|
||||
* to be enabled)
|
||||
*/
|
||||
bool faulting;
|
||||
|
||||
public:
|
||||
InstRecord(Tick _when, ThreadContext *_thread,
|
||||
const StaticInstPtr _staticInst,
|
||||
@@ -151,7 +157,8 @@ class InstRecord
|
||||
: when(_when), thread(_thread), staticInst(_staticInst), pc(_pc),
|
||||
macroStaticInst(_macroStaticInst), addr(0), size(0), flags(0),
|
||||
fetch_seq(0), cp_seq(0), data_status(DataInvalid), mem_valid(false),
|
||||
fetch_seq_valid(false), cp_seq_valid(false), predicate(true)
|
||||
fetch_seq_valid(false), cp_seq_valid(false), predicate(true),
|
||||
faulting(false)
|
||||
{ }
|
||||
|
||||
virtual ~InstRecord()
|
||||
@@ -218,6 +225,8 @@ class InstRecord
|
||||
|
||||
void setPredicate(bool val) { predicate = val; }
|
||||
|
||||
void setFaulting(bool val) { faulting = val; }
|
||||
|
||||
virtual void dump() = 0;
|
||||
|
||||
public:
|
||||
@@ -241,6 +250,8 @@ class InstRecord
|
||||
|
||||
InstSeqNum getCpSeq() const { return cp_seq; }
|
||||
bool getCpSeqValid() const { return cp_seq_valid; }
|
||||
|
||||
bool getFaulting() const { return faulting; }
|
||||
};
|
||||
|
||||
class InstTracer : public SimObject
|
||||
|
||||
Reference in New Issue
Block a user