gem5 v24.0.0.0
Loading...
Searching...
No Matches
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.
 
virtual void restore (ThreadContext *tc, HtmFailureFaultCause cause)
 Every ISA implementing HTM support should override the restore method.
 
bool valid () const
 
uint64_t newHtmUid ()
 Generates a new HTM identifier (used when starting a new transaction)
 
uint64_t getHtmUid () const
 Returns the current HTM identifier.
 
void setHtmUid (uint64_t new_htm_uid)
 Sets the current HTM identifier.
 

Protected Member Functions

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

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 Tue Jun 18 2024 16:24:10 for gem5 by doxygen 1.11.0