From 3080bbcc365e6ed663787a4c06cd2b7c4a118d47 Mon Sep 17 00:00:00 2001 From: Radhika Jagtap Date: Mon, 7 Dec 2015 16:42:16 -0600 Subject: 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. --- src/cpu/o3/probe/elastic_trace.hh | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) (limited to 'src/cpu/o3/probe/elastic_trace.hh') 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 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 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; /** @} */ /** -- cgit v1.2.3