gem5  v22.1.0.0
Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes | Static Private Attributes | List of all members
gem5::BaseHTMCheckpoint Class Reference

Transactional Memory checkpoint. More...

#include <htm.hh>

Inheritance diagram for gem5::BaseHTMCheckpoint:
gem5::ArmISA::HTMCheckpoint

Public Member Functions

 BaseHTMCheckpoint ()
 
virtual ~BaseHTMCheckpoint ()
 
virtual void save (ThreadContext *tc)
 Every ISA implementing HTM support should override the save method. More...
 
virtual void restore (ThreadContext *tc, HtmFailureFaultCause cause)
 Every ISA implementing HTM support should override the restore method. More...
 
bool valid () const
 
uint64_t newHtmUid ()
 Generates a new HTM identifier (used when starting a new transaction) More...
 
uint64_t getHtmUid () const
 Returns the current HTM identifier. More...
 
void setHtmUid (uint64_t new_htm_uid)
 Sets the current HTM identifier. More...
 

Protected Member Functions

virtual void reset ()
 Resets the checkpoint once a transaction has completed. More...
 

Protected Attributes

bool _valid
 

Private Attributes

uint64_t localHtmUid
 

Static Private Attributes

static uint64_t globalHtmUid = 0
 

Detailed Description

Transactional Memory checkpoint.

Definition at line 132 of file htm.hh.

Constructor & Destructor Documentation

◆ BaseHTMCheckpoint()

gem5::BaseHTMCheckpoint::BaseHTMCheckpoint ( )
inline

Definition at line 139 of file htm.hh.

References reset().

◆ ~BaseHTMCheckpoint()

virtual gem5::BaseHTMCheckpoint::~BaseHTMCheckpoint ( )
inlinevirtual

Definition at line 143 of file htm.hh.

Member Function Documentation

◆ getHtmUid()

uint64_t gem5::BaseHTMCheckpoint::getHtmUid ( ) const
inline

Returns the current HTM identifier.

Definition at line 190 of file htm.hh.

References localHtmUid.

◆ newHtmUid()

uint64_t gem5::BaseHTMCheckpoint::newHtmUid ( )
inline

Generates a new HTM identifier (used when starting a new transaction)

Definition at line 180 of file htm.hh.

References globalHtmUid, and localHtmUid.

◆ reset()

virtual void gem5::BaseHTMCheckpoint::reset ( )
inlineprotectedvirtual

Resets the checkpoint once a transaction has completed.

The method is bringing up the checkpoint to a known reset state so that it can be reused. ISA specific checkpoints inheriting from this class should override this method so that they can reset their own ISA specific state.

Reimplemented in gem5::ArmISA::HTMCheckpoint.

Definition at line 213 of file htm.hh.

References _valid.

Referenced by BaseHTMCheckpoint(), gem5::ArmISA::HTMCheckpoint::reset(), and restore().

◆ restore()

virtual void gem5::BaseHTMCheckpoint::restore ( ThreadContext tc,
HtmFailureFaultCause  cause 
)
inlinevirtual

Every ISA implementing HTM support should override the restore method.

This is called once a transaction gets aborted and the architectural state needs to be reverted. This will restore the checkpointed arch state.

Parameters
tcthread context to be restored
causethe reason why the transaction has been aborted

Reimplemented in gem5::ArmISA::HTMCheckpoint.

Definition at line 169 of file htm.hh.

References reset().

Referenced by gem5::ArmISA::HTMCheckpoint::restore().

◆ save()

virtual void gem5::BaseHTMCheckpoint::save ( ThreadContext tc)
inlinevirtual

Every ISA implementing HTM support should override the save method.

This is called once a transaction starts and the architectural state needs to be saved. This will checkpoint the arch state.

Parameters
tcthread context state to be saved

Reimplemented in gem5::ArmISA::HTMCheckpoint.

Definition at line 154 of file htm.hh.

References _valid.

Referenced by gem5::ArmISA::HTMCheckpoint::save().

◆ setHtmUid()

void gem5::BaseHTMCheckpoint::setHtmUid ( uint64_t  new_htm_uid)
inline

Sets the current HTM identifier.

Definition at line 199 of file htm.hh.

References localHtmUid.

◆ valid()

bool gem5::BaseHTMCheckpoint::valid ( ) const
inline

Definition at line 174 of file htm.hh.

References _valid.

Member Data Documentation

◆ _valid

bool gem5::BaseHTMCheckpoint::_valid
protected

Definition at line 214 of file htm.hh.

Referenced by reset(), save(), and valid().

◆ globalHtmUid

uint64_t gem5::BaseHTMCheckpoint::globalHtmUid = 0
staticprivate

Definition at line 135 of file htm.hh.

Referenced by newHtmUid().

◆ localHtmUid

uint64_t gem5::BaseHTMCheckpoint::localHtmUid
private

Definition at line 136 of file htm.hh.

Referenced by getHtmUid(), newHtmUid(), and setHtmUid().


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

Generated on Wed Dec 21 2022 10:23:10 for gem5 by doxygen 1.9.1