diff options
author | Radhika Jagtap <radhika.jagtap@ARM.com> | 2015-12-07 16:42:16 -0600 |
---|---|---|
committer | Radhika Jagtap <radhika.jagtap@ARM.com> | 2015-12-07 16:42:16 -0600 |
commit | 3080bbcc365e6ed663787a4c06cd2b7c4a118d47 (patch) | |
tree | a73d051d5aa5a26d0e64d348a7f121e089ebc139 /src/cpu/o3/probe/elastic_trace.hh | |
parent | 9bd5051b6022249f95364ef30b100b69ac7e7c37 (diff) | |
download | gem5-3080bbcc365e6ed663787a4c06cd2b7c4a118d47.tar.xz |
cpu: Create record type enum for elastic traces
This patch replaces the booleans that specified the elastic trace record
type with an enum type. The source of change is the proto message for
elastic trace where the enum is introduced. The struct definitions in the
elastic trace probe listener as well as the Trace CPU replace the boleans
with the proto message enum.
The patch does not impact functionality, but traces are not compatible with
previous version. This is preparation for adding new types of records in
subsequent patches.
Diffstat (limited to 'src/cpu/o3/probe/elastic_trace.hh')
-rw-r--r-- | src/cpu/o3/probe/elastic_trace.hh | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/src/cpu/o3/probe/elastic_trace.hh b/src/cpu/o3/probe/elastic_trace.hh index 5dd2949e8..001dc0e13 100644 --- a/src/cpu/o3/probe/elastic_trace.hh +++ b/src/cpu/o3/probe/elastic_trace.hh @@ -92,6 +92,10 @@ class ElasticTrace : public ProbeListenerObject typedef typename O3CPUImpl::DynInstPtr DynInstPtr; typedef typename std::pair<InstSeqNum, PhysRegIndex> SeqNumRegPair; + /** Trace record types corresponding to instruction node types */ + typedef ProtoMessage::InstDepRecord::RecordType RecordType; + typedef ProtoMessage::InstDepRecord Record; + /** Constructor */ ElasticTrace(const ElasticTraceParams *params); @@ -260,14 +264,16 @@ class ElasticTrace : public ProbeListenerObject */ /* Instruction sequence number. */ InstSeqNum instNum; + /** The type of trace record for the instruction node */ + RecordType type; /* Tick when instruction was in execute stage. */ Tick executeTick; /* Tick when instruction was marked ready and sent to commit stage. */ Tick toCommitTick; /* Tick when instruction was committed. */ Tick commitTick; - /* If instruction was a load, a store, committed. */ - bool load, store, commit; + /* If instruction was committed, as against squashed. */ + bool commit; /* List of order dependencies. */ std::list<InstSeqNum> robDepList; /* List of physical register RAW dependencies. */ @@ -287,6 +293,18 @@ class ElasticTrace : public ProbeListenerObject Addr addr; /* Request size in case of a load/store instruction */ unsigned size; + /** Default Constructor */ + TraceInfo() + : type(Record::INVALID) + { } + /** Is the record a load */ + bool isLoad() const { return (type == Record::LOAD); } + /** Is the record a store */ + bool isStore() const { return (type == Record::STORE); } + /** Is the record a fetch triggering an Icache request */ + bool isComp() const { return (type == Record::COMP); } + /** Return string specifying the type of the node */ + const std::string& typeToStr() const; /** @} */ /** |