gem5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Public Types | Public Member Functions | Public Attributes | Private Types | Private Member Functions | Private Attributes | List of all members
ElasticTrace Class Reference

The elastic trace is a type of probe listener and listens to probe points in multiple stages of the O3CPU. More...

#include <elastic_trace.hh>

Inheritance diagram for ElasticTrace:
ProbeListenerObject SimObject EventManager Serializable Drainable

Classes

struct  InstExecInfo
 
struct  TraceInfo
 

Public Types

typedef O3CPUImpl::DynInstPtr DynInstPtr
 
typedef std::pair< InstSeqNum,
PhysRegIndex
SeqNumRegPair
 
typedef
ProtoMessage::InstDepRecord::RecordType 
RecordType
 Trace record types corresponding to instruction node types. More...
 
typedef ProtoMessage::InstDepRecord Record
 
- Public Types inherited from SimObject
typedef SimObjectParams Params
 

Public Member Functions

 ElasticTrace (const ElasticTraceParams *params)
 Constructor. More...
 
void regProbeListeners ()
 Register the probe listeners that is the methods called on a probe point notify() call. More...
 
void regEtraceListeners ()
 Register all listeners. More...
 
const std::string name () const
 Returns the name of the trace probe listener. More...
 
void flushTraces ()
 Process any outstanding trace records, flush them out to the protobuf output streams and delete the streams at simulation exit. More...
 
void fetchReqTrace (const RequestPtr &req)
 Take the fields of the request class object that are relevant to create an instruction fetch request. More...
 
void recordExecTick (const DynInstPtr &dyn_inst)
 Populate the execute timestamp field in an InstExecInfo object for an instruction in flight. More...
 
void recordToCommTick (const DynInstPtr &dyn_inst)
 Populate the timestamp field in an InstExecInfo object for an instruction in flight when it is execution is complete and it is ready to commit. More...
 
void updateRegDep (const DynInstPtr &dyn_inst)
 Record a Read After Write physical register dependency if there has been a write to the source register and update the physical register map. More...
 
void removeRegDepMapEntry (const SeqNumRegPair &inst_reg_pair)
 When an instruction gets squashed the destination register mapped to it is freed up in the rename stage. More...
 
void addSquashedInst (const DynInstPtr &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 was sent for it. More...
 
void addCommittedInst (const DynInstPtr &head_inst)
 Add an instruction that is at the head of the ROB and is committed. More...
 
void regStats ()
 Register statistics for the elastic trace. More...
 
- Public Member Functions inherited from ProbeListenerObject
 ProbeListenerObject (const ProbeListenerObjectParams *params)
 
virtual ~ProbeListenerObject ()
 
ProbeManagergetProbeManager ()
 
- Public Member Functions inherited from SimObject
const Paramsparams () const
 
 SimObject (const Params *_params)
 
virtual ~SimObject ()
 
virtual void init ()
 init() is called after all C++ SimObjects have been created and all ports are connected. More...
 
virtual void loadState (CheckpointIn &cp)
 loadState() is called on each SimObject when restoring from a checkpoint. More...
 
virtual void initState ()
 initState() is called on each SimObject when not restoring from a checkpoint. More...
 
virtual void resetStats ()
 Reset statistics associated with this object. More...
 
virtual void regProbePoints ()
 Register probe points for this object. More...
 
ProbeManagergetProbeManager ()
 Get the probe manager for this object. More...
 
virtual void startup ()
 startup() is the final initialization call before simulation. More...
 
DrainState drain () override
 Provide a default implementation of the drain interface for objects that don't need draining. More...
 
virtual void memWriteback ()
 Write back dirty buffers to memory using functional writes. More...
 
virtual void memInvalidate ()
 Invalidate the contents of memory buffers. More...
 
void serialize (CheckpointOut &cp) const override
 Serialize an object. More...
 
void unserialize (CheckpointIn &cp) override
 Unserialize an object. More...
 
- Public Member Functions inherited from EventManager
 EventManager (EventManager &em)
 
 EventManager (EventManager *em)
 
 EventManager (EventQueue *eq)
 
EventQueueeventQueue () const
 
void schedule (Event &event, Tick when)
 
void deschedule (Event &event)
 
void reschedule (Event &event, Tick when, bool always=false)
 
void schedule (Event *event, Tick when)
 
void deschedule (Event *event)
 
void reschedule (Event *event, Tick when, bool always=false)
 
void wakeupEventQueue (Tick when=(Tick)-1)
 
void setCurTick (Tick newVal)
 
- Public Member Functions inherited from Serializable
 Serializable ()
 
virtual ~Serializable ()
 
void serializeSection (CheckpointOut &cp, const char *name) const
 Serialize an object into a new section. More...
 
void serializeSection (CheckpointOut &cp, const std::string &name) const
 
void unserializeSection (CheckpointIn &cp, const char *name)
 Unserialize an a child object. More...
 
void unserializeSection (CheckpointIn &cp, const std::string &name)
 
- Public Member Functions inherited from Drainable
DrainState drainState () const
 Return the current drain state of an object. More...
 
virtual void notifyFork ()
 Notify a child process of a fork. More...
 

Public Attributes

EventWrapper< ElasticTrace,&ElasticTrace::regEtraceListenersregEtraceListenersEvent
 Event to trigger registering this listener for all probe points. More...
 

Private Types

typedef std::vector< TraceInfo * >
::iterator 
depTraceItr
 Typedef of iterator to the instruction dependency trace. More...
 
typedef std::reverse_iterator
< depTraceItr
depTraceRevItr
 Typedef of the reverse iterator to the instruction dependency trace. More...
 

Private Member Functions

void addDepTraceRecord (const DynInstPtr &head_inst, InstExecInfo *exec_info_ptr, bool commit)
 Add a record to the dependency trace depTrace which is a sequential container. More...
 
void clearTempStoreUntil (const DynInstPtr head_inst)
 Clear entries in the temporary store of execution info objects to free allocated memory until the present instruction being added to the trace. More...
 
void compDelayRob (TraceInfo *past_record, TraceInfo *new_record)
 Calculate the computational delay between an instruction and a subsequent instruction that has an ROB (order) dependency on it. More...
 
void compDelayPhysRegDep (TraceInfo *past_record, TraceInfo *new_record)
 Calculate the computational delay between an instruction and a subsequent instruction that has a Physical Register (data) dependency on it. More...
 
void writeDepTrace (uint32_t num_to_write)
 Write out given number of records to the trace starting with the first record in depTrace and iterating through the trace in sequence. More...
 
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 update the new node's Rob dependency list. More...
 
void updateIssueOrderDep (TraceInfo *new_record)
 Reverse iterate through the graph, search for an issue order dependency for a new node and update the new node's Rob dependency list. More...
 
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 list and increment the number of dependents of the past record. More...
 
bool hasStoreCommitted (TraceInfo *past_record, Tick execute_tick) const
 Check if past record is a store sent earlier than the execute tick. More...
 
bool hasLoadCompleted (TraceInfo *past_record, Tick execute_tick) const
 Check if past record is a load that completed earlier than the execute tick. More...
 
bool hasLoadBeenSent (TraceInfo *past_record, Tick execute_tick) const
 Check if past record is a load sent earlier than the execute tick. More...
 
bool hasCompCompleted (TraceInfo *past_record, Tick execute_tick) const
 Check if past record is a comp node that completed earlier than the execute tick. More...
 

Private Attributes

bool firstWin
 Used for checking the first window for processing and writing of dependency trace. More...
 
std::unordered_map< InstSeqNum,
InstExecInfo * > 
tempStore
 Temporary store of InstExecInfo objects. More...
 
InstSeqNum lastClearedSeqNum
 The last cleared instruction sequence number used to free up the memory allocated in the temporary store. More...
 
std::unordered_map
< PhysRegIndex, InstSeqNum
physRegDepMap
 Map for recording the producer of a physical register to check Read After Write dependencies. More...
 
std::vector< TraceInfo * > depTrace
 The instruction dependency trace containing TraceInfo objects. More...
 
std::unordered_map< InstSeqNum,
TraceInfo * > 
traceInfoMap
 Map where the instruction sequence number is mapped to the pointer to the TraceInfo object. More...
 
uint32_t depWindowSize
 The maximum distance for a dependency and is set by a top level level parameter. More...
 
ProtoOutputStreamdataTraceStream
 Protobuf output stream for data dependency trace. More...
 
ProtoOutputStreaminstTraceStream
 Protobuf output stream for instruction fetch trace. More...
 
const InstSeqNum startTraceInst
 Number of instructions after which to enable tracing. More...
 
bool allProbesReg
 Whther the elastic trace listener has been registered for all probes. More...
 
const bool traceVirtAddr
 Whether to trace virtual addresses for memory requests. More...
 
FullO3CPU< O3CPUImpl > * cpu
 Pointer to the O3CPU that is this listener's parent a.k.a. More...
 
Stats::Scalar numRegDep
 Number of register dependencies recorded during tracing. More...
 
Stats::Scalar numOrderDepStores
 Number of stores that got assigned a commit order dependency on a past load/store. More...
 
Stats::Scalar numIssueOrderDepLoads
 Number of load insts that got assigned an issue order dependency because they were dependency-free. More...
 
Stats::Scalar numIssueOrderDepStores
 Number of store insts that got assigned an issue order dependency because they were dependency-free. More...
 
Stats::Scalar numIssueOrderDepOther
 Number of non load/store insts that got assigned an issue order dependency because they were dependency-free. More...
 
Stats::Scalar numFilteredNodes
 Number of filtered nodes. More...
 
Stats::Scalar maxNumDependents
 Maximum number of dependents on any instruction. More...
 
Stats::Scalar maxTempStoreSize
 Maximum size of the temporary store mostly useful as a check that it is not growing. More...
 
Stats::Scalar maxPhysRegDepMapSize
 Maximum size of the map that holds the last writer to a physical register. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from SimObject
static void serializeAll (CheckpointOut &cp)
 Serialize all SimObjects in the system. More...
 
static SimObjectfind (const char *name)
 Find the SimObject with the given name and return a pointer to it. More...
 
- Static Public Member Functions inherited from Serializable
static const std::string & currentSection ()
 Get the fully-qualified name of the active section. More...
 
static void serializeAll (const std::string &cpt_dir)
 
static void unserializeGlobals (CheckpointIn &cp)
 
- Static Public Attributes inherited from Serializable
static int ckptCount = 0
 
static int ckptMaxCount = 0
 
static int ckptPrevCount = -1
 
- Protected Member Functions inherited from Drainable
 Drainable ()
 
virtual ~Drainable ()
 
virtual void drainResume ()
 Resume execution after a successful drain. More...
 
void signalDrainDone () const
 Signal that an object is drained. More...
 
- Protected Attributes inherited from ProbeListenerObject
ProbeManagermanager
 
std::vector< ProbeListener * > listeners
 
- Protected Attributes inherited from SimObject
const SimObjectParams * _params
 Cached copy of the object parameters. More...
 
- Protected Attributes inherited from EventManager
EventQueueeventq
 A pointer to this object's event queue. More...
 

Detailed Description

The elastic trace is a type of probe listener and listens to probe points in multiple stages of the O3CPU.

The notify method is called on a probe point typically when an instruction successfully progresses through that stage.

As different listener methods mapped to the different probe points execute, relevant information about the instruction, e.g. timestamps and register accesses, are captured and stored in temporary data structures. When the instruction progresses through the commit stage, the timing as well as dependency information about the instruction is finalised and encapsulated in a struct called TraceInfo. TraceInfo objects are collected in a list instead of writing them out to the trace file one a time. This is required as the trace is processed in chunks to evaluate order dependencies and computational delay in case an instruction does not have any register dependencies. By this we achieve a simpler algorithm during replay because every record in the trace can be hooked onto a record in its past. The trace is written out as a protobuf format output file.

The output trace can be read in and played back by the TraceCPU.

Definition at line 88 of file elastic_trace.hh.

Member Typedef Documentation

typedef std::vector<TraceInfo*>::iterator ElasticTrace::depTraceItr
private

Typedef of iterator to the instruction dependency trace.

Definition at line 343 of file elastic_trace.hh.

typedef std::reverse_iterator<depTraceItr> ElasticTrace::depTraceRevItr
private

Typedef of the reverse iterator to the instruction dependency trace.

Definition at line 346 of file elastic_trace.hh.

Definition at line 92 of file elastic_trace.hh.

typedef ProtoMessage::InstDepRecord ElasticTrace::Record

Definition at line 97 of file elastic_trace.hh.

typedef ProtoMessage::InstDepRecord::RecordType ElasticTrace::RecordType

Trace record types corresponding to instruction node types.

Definition at line 96 of file elastic_trace.hh.

Definition at line 93 of file elastic_trace.hh.

Constructor & Destructor Documentation

ElasticTrace::ElasticTrace ( const ElasticTraceParams *  params)

Member Function Documentation

void ElasticTrace::addCommittedInst ( const DynInstPtr head_inst)

Add an instruction that is at the head of the ROB and is committed.

Parameters
head_instpointer to dynamic instruction to be committed

Definition at line 319 of file elastic_trace.cc.

References addDepTraceRecord(), clearTempStoreUntil(), DPRINTF, DPRINTFR, ElasticTrace::InstExecInfo::executeTick, MaxTick, NoFault, tempStore, and ElasticTrace::InstExecInfo::toCommitTick.

Referenced by regEtraceListeners().

void ElasticTrace::addDepTraceRecord ( const DynInstPtr head_inst,
InstExecInfo exec_info_ptr,
bool  commit 
)
private
void ElasticTrace::addSquashedInst ( const DynInstPtr 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 was sent for it.

Parameters
head_instpointer to dynamic instruction to be squashed

Definition at line 291 of file elastic_trace.cc.

References addDepTraceRecord(), clearTempStoreUntil(), DPRINTFR, ElasticTrace::InstExecInfo::executeTick, MaxTick, NoFault, tempStore, and ElasticTrace::InstExecInfo::toCommitTick.

Referenced by regEtraceListeners().

void ElasticTrace::assignRobDep ( TraceInfo past_record,
TraceInfo new_record 
)
private

The new_record has an order dependency on a past_record, thus update the new record's Rob dependency list and increment the number of dependents of the past record.

Parameters
new_recordpointer to new record
past_recordpointer to record that new_record has a rob dependency on

Definition at line 594 of file elastic_trace.cc.

References compDelayRob(), DPRINTF, ElasticTrace::TraceInfo::instNum, maxNumDependents, ElasticTrace::TraceInfo::numDepts, ElasticTrace::TraceInfo::robDepList, ElasticTrace::TraceInfo::typeToStr(), and Stats::ScalarBase< Derived, Stor >::value().

Referenced by updateCommitOrderDep(), and updateIssueOrderDep().

void ElasticTrace::clearTempStoreUntil ( const DynInstPtr  head_inst)
private

Clear entries in the temporary store of execution info objects to free allocated memory until the present instruction being added to the trace.

Parameters
head_instpointer to dynamic instruction

Definition at line 641 of file elastic_trace.cc.

References lastClearedSeqNum, and tempStore.

Referenced by addCommittedInst(), and addSquashedInst().

void ElasticTrace::compDelayPhysRegDep ( TraceInfo past_record,
TraceInfo new_record 
)
private

Calculate the computational delay between an instruction and a subsequent instruction that has a Physical Register (data) dependency on it.

Parameters
past_recordPointer to instruction
new_recordPointer to subsequent instruction having a Physical Register dependency on the instruction pointed to by past_record

Definition at line 706 of file elastic_trace.cc.

References ElasticTrace::TraceInfo::commitTick, ElasticTrace::TraceInfo::compDelay, DPRINTF, ElasticTrace::TraceInfo::getExecuteTick(), ElasticTrace::TraceInfo::instNum, ElasticTrace::TraceInfo::isStore(), and ElasticTrace::TraceInfo::toCommitTick.

Referenced by addDepTraceRecord().

void ElasticTrace::compDelayRob ( TraceInfo past_record,
TraceInfo new_record 
)
private

Calculate the computational delay between an instruction and a subsequent instruction that has an ROB (order) dependency on it.

Parameters
past_recordPointer to instruction
new_recordPointer to subsequent instruction having an ROB dependency on the instruction pointed to by past_record

Definition at line 663 of file elastic_trace.cc.

References ElasticTrace::TraceInfo::commitTick, ElasticTrace::TraceInfo::compDelay, DPRINTF, ElasticTrace::TraceInfo::executeTick, ElasticTrace::TraceInfo::getExecuteTick(), ElasticTrace::TraceInfo::instNum, ElasticTrace::TraceInfo::isComp(), ElasticTrace::TraceInfo::isLoad(), ElasticTrace::TraceInfo::isStore(), and ElasticTrace::TraceInfo::toCommitTick.

Referenced by assignRobDep().

void ElasticTrace::fetchReqTrace ( const RequestPtr req)

Take the fields of the request class object that are relevant to create an instruction fetch request.

It creates a protobuf message containing the request fields and writes it to instTraceStream.

Parameters
reqpointer to the fetch request

Definition at line 143 of file elastic_trace.cc.

References curTick(), DPRINTFR, Request::getFlags(), Request::getPaddr(), Request::getPC(), Request::getSize(), Request::getVaddr(), instTraceStream, MemCmd::ReadReq, and ProtoOutputStream::write().

Referenced by regEtraceListeners().

void ElasticTrace::flushTraces ( )

Process any outstanding trace records, flush them out to the protobuf output streams and delete the streams at simulation exit.

Definition at line 939 of file elastic_trace.cc.

References dataTraceStream, depTrace, instTraceStream, and writeDepTrace().

Referenced by ElasticTrace().

bool ElasticTrace::hasCompCompleted ( TraceInfo past_record,
Tick  execute_tick 
) const
private

Check if past record is a comp node that completed earlier than the execute tick.

Parameters
past_recordpointer to past comp node
execute_ticktick with which to compare past comp node's completion tick
Returns
true if past record is comp completed earlier

Definition at line 634 of file elastic_trace.cc.

References ElasticTrace::TraceInfo::isComp(), and ElasticTrace::TraceInfo::toCommitTick.

Referenced by updateIssueOrderDep().

bool ElasticTrace::hasLoadBeenSent ( TraceInfo past_record,
Tick  execute_tick 
) const
private

Check if past record is a load sent earlier than the execute tick.

Parameters
past_recordpointer to past load
execute_ticktick with which to compare past load's send tick
Returns
true if past record is load sent earlier

Definition at line 625 of file elastic_trace.cc.

References ElasticTrace::TraceInfo::commit, ElasticTrace::TraceInfo::executeTick, and ElasticTrace::TraceInfo::isLoad().

Referenced by updateIssueOrderDep().

bool ElasticTrace::hasLoadCompleted ( TraceInfo past_record,
Tick  execute_tick 
) const
private

Check if past record is a load that completed earlier than the execute tick.

Parameters
past_recordpointer to past load
execute_ticktick with which to compare past load's complete tick
Returns
true if past record is load completed earlier

Definition at line 617 of file elastic_trace.cc.

References ElasticTrace::TraceInfo::commit, ElasticTrace::TraceInfo::isLoad(), and ElasticTrace::TraceInfo::toCommitTick.

Referenced by updateCommitOrderDep().

bool ElasticTrace::hasStoreCommitted ( TraceInfo past_record,
Tick  execute_tick 
) const
private

Check if past record is a store sent earlier than the execute tick.

Parameters
past_recordpointer to past store
execute_ticktick with which to compare past store's commit tick
Returns
true if past record is store sent earlier

Definition at line 610 of file elastic_trace.cc.

References ElasticTrace::TraceInfo::commitTick, and ElasticTrace::TraceInfo::isStore().

Referenced by updateCommitOrderDep(), and updateIssueOrderDep().

const std::string ElasticTrace::name ( ) const
virtual

Returns the name of the trace probe listener.

Reimplemented from SimObject.

Definition at line 933 of file elastic_trace.cc.

References SimObject::name().

Referenced by ElasticTrace(), and regStats().

void ElasticTrace::recordExecTick ( const DynInstPtr dyn_inst)

Populate the execute timestamp field in an InstExecInfo object for an instruction in flight.

Parameters
dyn_instpointer to dynamic instruction in flight

Definition at line 165 of file elastic_trace.cc.

References curTick(), DPRINTFR, ElasticTrace::InstExecInfo::executeTick, lastClearedSeqNum, maxTempStoreSize, tempStore, and Stats::ScalarBase< Derived, Stor >::value().

Referenced by regEtraceListeners().

void ElasticTrace::recordToCommTick ( const DynInstPtr dyn_inst)

Populate the timestamp field in an InstExecInfo object for an instruction in flight when it is execution is complete and it is ready to commit.

Parameters
dyn_instpointer to dynamic instruction in flight

Definition at line 202 of file elastic_trace.cc.

References curTick(), DPRINTFR, tempStore, and ElasticTrace::InstExecInfo::toCommitTick.

Referenced by regEtraceListeners().

void ElasticTrace::regEtraceListeners ( )
void ElasticTrace::regProbeListeners ( )
virtual

Register the probe listeners that is the methods called on a probe point notify() call.

Reimplemented from SimObject.

Definition at line 101 of file elastic_trace.cc.

References cpu, curTick(), inform, regEtraceListeners(), regEtraceListenersEvent, EventManager::schedule(), and startTraceInst.

void ElasticTrace::regStats ( )
virtual
void ElasticTrace::removeRegDepMapEntry ( const SeqNumRegPair inst_reg_pair)

When an instruction gets squashed the destination register mapped to it is freed up in the rename stage.

Remove the register entry from the physRegDepMap as well to avoid dependencies on squashed instructions.

Parameters
inst_reg_pairpair of inst. sequence no. and the register

Definition at line 281 of file elastic_trace.cc.

References DPRINTFR, and physRegDepMap.

Referenced by regEtraceListeners().

void ElasticTrace::updateCommitOrderDep ( TraceInfo new_record,
bool  find_load_not_store 
)
private

Reverse iterate through the graph, search for a store-after-store or store-after-load dependency and update the new node's Rob dependency list.

If a dependency is found, then call the assignRobDep() method that updates the store with the dependency information. This function is only called when a new store node is added to the trace.

Parameters
new_recordpointer to new store record
find_load_not_storetrue for searching store-after-load and false for searching store-after-store dependency

Definition at line 507 of file elastic_trace.cc.

References assignRobDep(), curTick(), depTrace, depWindowSize, hasLoadCompleted(), hasStoreCommitted(), ElasticTrace::TraceInfo::isStore(), and numOrderDepStores.

Referenced by addDepTraceRecord().

void ElasticTrace::updateIssueOrderDep ( TraceInfo new_record)
private

Reverse iterate through the graph, search for an issue order dependency for a new node and update the new node's Rob dependency list.

If a dependency is found, call the assignRobDep() method that updates the node with its dependency information. This function is called in case a new node to be added to the trace is dependency-free or its dependency got discarded because the dependency was outside the window.

Parameters
new_recordpointer to new record to be added to the trace

Definition at line 548 of file elastic_trace.cc.

References assignRobDep(), curTick(), depTrace, depWindowSize, ElasticTrace::TraceInfo::executeTick, hasCompCompleted(), hasLoadBeenSent(), hasStoreCommitted(), ElasticTrace::TraceInfo::isLoad(), ElasticTrace::TraceInfo::isStore(), numIssueOrderDepLoads, numIssueOrderDepOther, numIssueOrderDepStores, and ElasticTrace::TraceInfo::toCommitTick.

Referenced by addDepTraceRecord().

void ElasticTrace::updateRegDep ( const DynInstPtr dyn_inst)

Record a Read After Write physical register dependency if there has been a write to the source register and update the physical register map.

For this look up the physRegDepMap with this instruction as the writer of its destination register. If the dependency falls outside the window it is assumed as already complete. Duplicate entries are avoided.

Parameters
dyn_instpointer to dynamic instruction in flight

Definition at line 223 of file elastic_trace.cc.

References depWindowSize, DPRINTFR, lastClearedSeqNum, maxPhysRegDepMapSize, MiscRegClass, physRegDepMap, ElasticTrace::InstExecInfo::physRegDepSet, regIdxToClass(), tempStore, Stats::ScalarBase< Derived, Stor >::value(), and AlphaISA::ZeroReg.

Referenced by regEtraceListeners().

void ElasticTrace::writeDepTrace ( uint32_t  num_to_write)
private

Member Data Documentation

bool ElasticTrace::allProbesReg
private

Whther the elastic trace listener has been registered for all probes.

When enabling tracing after a specified number of instructions have committed, check this to prevent re-registering the listener.

Definition at line 371 of file elastic_trace.hh.

Referenced by regEtraceListeners().

FullO3CPU<O3CPUImpl>* ElasticTrace::cpu
private

Pointer to the O3CPU that is this listener's parent a.k.a.

manager

Definition at line 377 of file elastic_trace.hh.

Referenced by ElasticTrace(), regEtraceListeners(), and regProbeListeners().

ProtoOutputStream* ElasticTrace::dataTraceStream
private

Protobuf output stream for data dependency trace.

Definition at line 357 of file elastic_trace.hh.

Referenced by ElasticTrace(), flushTraces(), and writeDepTrace().

std::vector<TraceInfo*> ElasticTrace::depTrace
private

The instruction dependency trace containing TraceInfo objects.

The container implemented is sequential as dependencies obey commit order (program order). For example, if B is dependent on A then B must be committed after A. Thus records are updated with dependency information and written to the trace in commit order. This ensures that when a graph is reconstructed from the trace during replay, all the dependencies are stored in the graph before the dependent itself is added. This facilitates creating a tree data structure during replay, i.e. adding children as records are read from the trace in an efficient manner.

Definition at line 334 of file elastic_trace.hh.

Referenced by addDepTraceRecord(), flushTraces(), updateCommitOrderDep(), updateIssueOrderDep(), and writeDepTrace().

uint32_t ElasticTrace::depWindowSize
private

The maximum distance for a dependency and is set by a top level level parameter.

It must be equal to or greater than the number of entries in the ROB. This variable is used as the length of the sliding window for processing the dependency trace.

Definition at line 354 of file elastic_trace.hh.

Referenced by addDepTraceRecord(), ElasticTrace(), updateCommitOrderDep(), updateIssueOrderDep(), and updateRegDep().

bool ElasticTrace::firstWin
private

Used for checking the first window for processing and writing of dependency trace.

At the start of the program there can be dependency- free instructions and such cases are handled differently.

Definition at line 194 of file elastic_trace.hh.

Referenced by addDepTraceRecord(), and writeDepTrace().

ProtoOutputStream* ElasticTrace::instTraceStream
private

Protobuf output stream for instruction fetch trace.

Definition at line 360 of file elastic_trace.hh.

Referenced by ElasticTrace(), fetchReqTrace(), and flushTraces().

InstSeqNum ElasticTrace::lastClearedSeqNum
private

The last cleared instruction sequence number used to free up the memory allocated in the temporary store.

Definition at line 240 of file elastic_trace.hh.

Referenced by clearTempStoreUntil(), recordExecTick(), and updateRegDep().

Stats::Scalar ElasticTrace::maxNumDependents
private

Maximum number of dependents on any instruction.

Definition at line 547 of file elastic_trace.hh.

Referenced by assignRobDep(), and regStats().

Stats::Scalar ElasticTrace::maxPhysRegDepMapSize
private

Maximum size of the map that holds the last writer to a physical register.

Definition at line 559 of file elastic_trace.hh.

Referenced by regStats(), and updateRegDep().

Stats::Scalar ElasticTrace::maxTempStoreSize
private

Maximum size of the temporary store mostly useful as a check that it is not growing.

Definition at line 553 of file elastic_trace.hh.

Referenced by recordExecTick(), and regStats().

Stats::Scalar ElasticTrace::numFilteredNodes
private

Number of filtered nodes.

Definition at line 544 of file elastic_trace.hh.

Referenced by regStats(), and writeDepTrace().

Stats::Scalar ElasticTrace::numIssueOrderDepLoads
private

Number of load insts that got assigned an issue order dependency because they were dependency-free.

Definition at line 529 of file elastic_trace.hh.

Referenced by regStats(), and updateIssueOrderDep().

Stats::Scalar ElasticTrace::numIssueOrderDepOther
private

Number of non load/store insts that got assigned an issue order dependency because they were dependency-free.

Definition at line 541 of file elastic_trace.hh.

Referenced by regStats(), and updateIssueOrderDep().

Stats::Scalar ElasticTrace::numIssueOrderDepStores
private

Number of store insts that got assigned an issue order dependency because they were dependency-free.

Definition at line 535 of file elastic_trace.hh.

Referenced by regStats(), and updateIssueOrderDep().

Stats::Scalar ElasticTrace::numOrderDepStores
private

Number of stores that got assigned a commit order dependency on a past load/store.

Definition at line 523 of file elastic_trace.hh.

Referenced by regStats(), and updateCommitOrderDep().

Stats::Scalar ElasticTrace::numRegDep
private

Number of register dependencies recorded during tracing.

Definition at line 517 of file elastic_trace.hh.

Referenced by addDepTraceRecord(), and regStats().

std::unordered_map<PhysRegIndex, InstSeqNum> ElasticTrace::physRegDepMap
private

Map for recording the producer of a physical register to check Read After Write dependencies.

The key is the renamed physical register and the value is the instruction sequence number of its last producer.

Definition at line 247 of file elastic_trace.hh.

Referenced by removeRegDepMapEntry(), and updateRegDep().

EventWrapper<ElasticTrace, &ElasticTrace::regEtraceListeners> ElasticTrace::regEtraceListenersEvent

Event to trigger registering this listener for all probe points.

Definition at line 186 of file elastic_trace.hh.

Referenced by regProbeListeners().

const InstSeqNum ElasticTrace::startTraceInst
private

Number of instructions after which to enable tracing.

Definition at line 363 of file elastic_trace.hh.

Referenced by regProbeListeners().

std::unordered_map<InstSeqNum, InstExecInfo*> ElasticTrace::tempStore
private

Temporary store of InstExecInfo objects.

Later on when an instruction is processed for commit or retire, if it is chosen to be written to the output trace then this information is looked up using the instruction sequence number as the key. If it is not chosen then the entry for it in the store is cleared.

Definition at line 234 of file elastic_trace.hh.

Referenced by addCommittedInst(), addSquashedInst(), clearTempStoreUntil(), recordExecTick(), recordToCommTick(), and updateRegDep().

std::unordered_map<InstSeqNum, TraceInfo*> ElasticTrace::traceInfoMap
private

Map where the instruction sequence number is mapped to the pointer to the TraceInfo object.

Definition at line 340 of file elastic_trace.hh.

Referenced by addDepTraceRecord(), and writeDepTrace().

const bool ElasticTrace::traceVirtAddr
private

Whether to trace virtual addresses for memory requests.

Definition at line 374 of file elastic_trace.hh.

Referenced by writeDepTrace().


The documentation for this class was generated from the following files:

Generated on Fri Jun 9 2017 13:04:09 for gem5 by doxygen 1.8.6