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

Transactional Memory checkpoint. More...

#include <htm.hh>

Inheritance diagram for BaseHTMCheckpoint:
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 129 of file htm.hh.

Constructor & Destructor Documentation

◆ BaseHTMCheckpoint()

BaseHTMCheckpoint::BaseHTMCheckpoint ( )
inline

Definition at line 136 of file htm.hh.

References reset().

◆ ~BaseHTMCheckpoint()

virtual BaseHTMCheckpoint::~BaseHTMCheckpoint ( )
inlinevirtual

Definition at line 140 of file htm.hh.

Member Function Documentation

◆ getHtmUid()

uint64_t BaseHTMCheckpoint::getHtmUid ( ) const
inline

Returns the current HTM identifier.

Definition at line 187 of file htm.hh.

References localHtmUid.

◆ newHtmUid()

uint64_t BaseHTMCheckpoint::newHtmUid ( )
inline

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

Definition at line 177 of file htm.hh.

References globalHtmUid, and localHtmUid.

◆ reset()

virtual void 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 ArmISA::HTMCheckpoint.

Definition at line 210 of file htm.hh.

References _valid.

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

◆ restore()

virtual void 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 ArmISA::HTMCheckpoint.

Definition at line 166 of file htm.hh.

References reset().

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

◆ save()

virtual void 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 ArmISA::HTMCheckpoint.

Definition at line 151 of file htm.hh.

References _valid.

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

◆ setHtmUid()

void BaseHTMCheckpoint::setHtmUid ( uint64_t  new_htm_uid)
inline

Sets the current HTM identifier.

Definition at line 196 of file htm.hh.

References localHtmUid.

◆ valid()

bool BaseHTMCheckpoint::valid ( ) const
inline

Definition at line 171 of file htm.hh.

References _valid.

Member Data Documentation

◆ _valid

bool BaseHTMCheckpoint::_valid
protected

Definition at line 211 of file htm.hh.

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

◆ globalHtmUid

uint64_t BaseHTMCheckpoint::globalHtmUid = 0
staticprivate

Definition at line 132 of file htm.hh.

Referenced by newHtmUid().

◆ localHtmUid

uint64_t BaseHTMCheckpoint::localHtmUid
private

Definition at line 133 of file htm.hh.

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


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

Generated on Wed Sep 30 2020 14:02:21 for gem5 by doxygen 1.8.17