Go to the documentation of this file.
46 #ifndef __CPU_O3_PROBE_ELASTIC_TRACE_HH__
47 #define __CPU_O3_PROBE_ELASTIC_TRACE_HH__
50 #include <unordered_map>
56 #include "params/ElasticTrace.hh"
57 #include "proto/inst_dep_record.pb.h"
58 #include "proto/packet.pb.h"
93 typedef ProtoMessage::InstDepRecord::RecordType
RecordType;
94 typedef ProtoMessage::InstDepRecord
Record;
109 const std::string
name()
const;
227 std::unordered_map<InstSeqNum, InstExecInfo*>
tempStore;
557 #endif//__CPU_O3_PROBE_ELASTIC_TRACE_HH__
The elastic trace is a type of probe listener and listens to probe points in multiple stages of the O...
std::unordered_map< PhysRegIndex, InstSeqNum > physRegDepMap
Map for recording the producer of a physical register to check Read After Write dependencies.
std::unordered_map< InstSeqNum, TraceInfo * > traceInfoMap
Map where the instruction sequence number is mapped to the pointer to the TraceInfo object.
void recordToCommTick(const DynInstConstPtr &dyn_inst)
Populate the timestamp field in an InstExecInfo object for an instruction in flight when it is execut...
bool isStore() const
Is the record a store.
bool hasCompCompleted(TraceInfo *past_record, Tick execute_tick) const
Check if past record is a comp node that completed earlier than the execute tick.
void clearTempStoreUntil(const DynInstConstPtr &head_inst)
Clear entries in the temporary store of execution info objects to free allocated memory until the pre...
const InstSeqNum startTraceInst
Number of instructions after which to enable tracing.
O3CPUImpl::DynInstPtr DynInstPtr
InstSeqNum lastClearedSeqNum
The last cleared instruction sequence number used to free up the memory allocated in the temporary st...
Stats::Scalar numIssueOrderDepOther
Number of non load/store insts that got assigned an issue order dependency because they were dependen...
void updateIssueOrderDep(TraceInfo *new_record)
Reverse iterate through the graph, search for an issue order dependency for a new node and update the...
int64_t compDelay
Computational delay after the last dependent inst.
bool hasLoadCompleted(TraceInfo *past_record, Tick execute_tick) const
Check if past record is a load that completed earlier than the execute tick.
void regEtraceListeners()
Register all listeners.
void flushTraces()
Process any outstanding trace records, flush them out to the protobuf output streams and delete the s...
void regProbeListeners()
Register the probe listeners that is the methods called on a probe point notify() call.
const bool traceVirtAddr
Whether to trace virtual addresses for memory requests.
void fetchReqTrace(const RequestPtr &req)
Take the fields of the request class object that are relevant to create an instruction fetch request.
Stats::Scalar numIssueOrderDepStores
Number of store insts that got assigned an issue order dependency because they were dependency-free.
uint64_t Tick
Tick count type.
void compDelayPhysRegDep(TraceInfo *past_record, TraceInfo *new_record)
Calculate the computational delay between an instruction and a subsequent instruction that has a Phys...
bool isLoad() const
Is the record a load.
std::shared_ptr< Request > RequestPtr
Stats::Scalar maxTempStoreSize
Maximum size of the temporary store mostly useful as a check that it is not growing.
const std::string & typeToStr() const
Return string specifying the type of the node.
Stats::Scalar maxPhysRegDepMapSize
Maximum size of the map that holds the last writer to a physical register.
void updateRegDep(const DynInstConstPtr &dyn_inst)
Record a Read After Write physical register dependency if there has been a write to the source regist...
bool firstWin
Used for checking the first window for processing and writing of dependency trace.
EventFunctionWrapper regEtraceListenersEvent
Event to trigger registering this listener for all probe points.
Stats::Scalar numOrderDepStores
Number of stores that got assigned a commit order dependency on a past load/store.
This is a simple scalar statistic, like a counter.
ProtoOutputStream * dataTraceStream
Protobuf output stream for data dependency trace.
Stats::Scalar maxNumDependents
Maximum number of dependents on any instruction.
std::pair< InstSeqNum, PhysRegIndex > SeqNumRegPair
std::list< InstSeqNum > physRegDepList
std::vector< TraceInfo * > depTrace
The instruction dependency trace containing TraceInfo objects.
InstExecInfo()
Constructor.
FullO3CPU< O3CPUImpl > * cpu
Pointer to the O3CPU that is this listener's parent a.k.a.
const std::string name() const
Returns the name of the trace probe listener.
void compDelayRob(TraceInfo *past_record, TraceInfo *new_record)
Calculate the computational delay between an instruction and a subsequent instruction that has an ROB...
std::set< InstSeqNum > physRegDepSet
Set of instruction sequence numbers that this instruction depends on due to Read After Write data dep...
ElasticTraceStats(Stats::Group *parent)
bool hasLoadBeenSent(TraceInfo *past_record, Tick execute_tick) const
Check if past record is a load sent earlier than the execute tick.
std::vector< TraceInfo * >::iterator depTraceItr
Typedef of iterator to the instruction dependency trace.
void assignRobDep(TraceInfo *past_record, TraceInfo *new_record)
The new_record has an order dependency on a past_record, thus update the new record's Rob dependency ...
void recordExecTick(const DynInstConstPtr &dyn_inst)
Populate the execute timestamp field in an InstExecInfo object for an instruction in flight.
void removeRegDepMapEntry(const SeqNumRegPair &inst_reg_pair)
When an instruction gets squashed the destination register mapped to it is freed up in the rename sta...
std::list< InstSeqNum > robDepList
TraceInfo()
Default Constructor.
This class is a minimal wrapper around SimObject.
ElasticTrace::ElasticTraceStats stats
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
std::unordered_map< InstSeqNum, InstExecInfo * > tempStore
Temporary store of InstExecInfo objects.
const Params * params() const
Stats::Scalar numIssueOrderDepLoads
Number of load insts that got assigned an issue order dependency because they were dependency-free.
Tick getExecuteTick() const
Get the execute tick of the instruction.
bool allProbesReg
Whther the elastic trace listener has been registered for all probes.
Stats::Scalar numRegDep
Number of register dependencies recorded during tracing.
std::reverse_iterator< depTraceItr > depTraceRevItr
Typedef of the reverse iterator to the instruction dependency trace.
Tick executeTick
Timestamp when instruction was first processed by execute stage.
uint32_t depWindowSize
The maximum distance for a dependency and is set by a top level level parameter.
void addCommittedInst(const DynInstConstPtr &head_inst)
Add an instruction that is at the head of the ROB and is committed.
ProtoMessage::InstDepRecord::RecordType RecordType
Trace record types corresponding to instruction node types.
void addDepTraceRecord(const DynInstConstPtr &head_inst, InstExecInfo *exec_info_ptr, bool commit)
Add a record to the dependency trace depTrace which is a sequential container.
O3CPUImpl::DynInstConstPtr DynInstConstPtr
If you want a reference counting pointer to a mutable object, create it like this:
void updateCommitOrderDep(TraceInfo *new_record, bool find_load_not_store)
Reverse iterate through the graph, search for a store-after-store or store-after-load dependency and ...
Stats::Scalar numFilteredNodes
Number of filtered nodes.
Request::FlagsType reqFlags
ProtoOutputStream * instTraceStream
Protobuf output stream for instruction fetch trace.
RecordType type
The type of trace record for the instruction node.
ProtoMessage::InstDepRecord Record
A ProtoOutputStream wraps a coded stream, potentially with compression, based on looking at the file ...
ElasticTrace(const ElasticTraceParams *params)
Constructor.
Tick toCommitTick
Timestamp when instruction execution is completed in execute stage and instruction is marked as ready...
bool isComp() const
Is the record a fetch triggering an Icache request.
bool hasStoreCommitted(TraceInfo *past_record, Tick execute_tick) const
Check if past record is a store sent earlier than the execute tick.
void writeDepTrace(uint32_t num_to_write)
Write out given number of records to the trace starting with the first record in depTrace and iterati...
void addSquashedInst(const DynInstConstPtr &head_inst)
Add an instruction that is at the head of the ROB and is squashed only if it is a load and a request ...
Generated on Wed Sep 30 2020 14:02:09 for gem5 by doxygen 1.8.17