gem5 v24.0.0.0
|
State of a counter within the PMU. More...
#include <pmu.hh>
Public Member Functions | |
CounterState (PMU &pmuReference, uint64_t counter_id, const bool is_64_bit) | |
void | serialize (CheckpointOut &cp) const override |
Serialize an object. | |
void | unserialize (CheckpointIn &cp) override |
Unserialize an object. | |
uint64_t | add (uint64_t delta) |
Add an event count to the counter and check for overflow. | |
bool | isFiltered () const |
void | detach () |
Detach the counter from its event. | |
void | attach (const std::shared_ptr< PMUEvent > &event) |
Attach this counter to an event. | |
uint64_t | getCounterId () const |
Obtain the counter id. | |
uint64_t | getValue () const |
rReturn the counter value | |
void | setValue (uint64_t val) |
overwrite the value of the counter | |
Public Member Functions inherited from gem5::Serializable | |
Serializable () | |
virtual | ~Serializable () |
void | serializeSection (CheckpointOut &cp, const char *name) const |
Serialize an object into a new section. | |
void | serializeSection (CheckpointOut &cp, const std::string &name) const |
void | unserializeSection (CheckpointIn &cp, const char *name) |
Unserialize an a child object. | |
void | unserializeSection (CheckpointIn &cp, const std::string &name) |
Public Attributes | |
EventTypeId | eventId |
Counter event ID. | |
PMEVTYPER_t | filter |
Filtering settings (evtCount is unused) | |
bool | enabled |
Is the counter enabled? | |
bool | overflow64 |
Is this a 64-bit counter? | |
Protected Member Functions | |
template<typename ... Args> | |
void | debugCounter (const char *mainString, Args &...args) const |
Protected Attributes | |
std::shared_ptr< PMUEvent > | sourceEvent |
PmuEvent currently in use (if any) | |
uint64_t | counterId |
id of the counter instance | |
uint64_t | value |
Current value of the counter. | |
bool | resetValue |
Flag keeping track if the counter has been reset. | |
PMU & | pmu |
Additional Inherited Members | |
Static Public Member Functions inherited from gem5::Serializable | |
static const std::string & | currentSection () |
Gets the fully-qualified name of the active section. | |
static void | generateCheckpointOut (const std::string &cpt_dir, std::ofstream &outstream) |
Generate a checkpoint file so that the serialization can be routed to it. | |
|
inline |
uint64_t gem5::ArmISA::PMU::CounterState::add | ( | uint64_t | delta | ) |
Add an event count to the counter and check for overflow.
delta | Number of events to add to the counter. |
Definition at line 786 of file pmu.cc.
References gem5::ArmISA::PMU::isFiltered().
void gem5::ArmISA::PMU::CounterState::attach | ( | const std::shared_ptr< PMUEvent > & | event | ) |
Attach this counter to an event.
the | event to attach the counter to |
Definition at line 547 of file pmu.cc.
References gem5::MipsISA::event.
Referenced by gem5::ArmISA::PMU::regProbeListeners(), and gem5::ArmISA::PMU::updateCounter().
|
inlineprotected |
Definition at line 500 of file pmu.hh.
References counterId, gem5::csprintf(), eventId, sourceEvent, and warn.
void gem5::ArmISA::PMU::CounterState::detach | ( | ) |
Detach the counter from its event.
Definition at line 535 of file pmu.cc.
Referenced by gem5::ArmISA::PMU::updateCounter().
|
inline |
Obtain the counter id.
Definition at line 453 of file pmu.hh.
References counterId.
Referenced by gem5::ArmISA::PMU::updateCounter().
uint64_t gem5::ArmISA::PMU::CounterState::getValue | ( | ) | const |
rReturn the counter value
Definition at line 558 of file pmu.cc.
Referenced by gem5::ArmISA::PMU::getCounterValue(), and gem5::ArmISA::PMU::readMiscRegInt().
bool gem5::ArmISA::PMU::CounterState::isFiltered | ( | ) | const |
Definition at line 508 of file pmu.cc.
References gem5::ArmISA::el, gem5::ArmISA::EL0, gem5::ArmISA::EL1, gem5::ArmISA::EL2, gem5::ArmISA::EL3, and panic.
|
overridevirtual |
Serialize an object.
Output an object's state into the current checkpoint section.
cp | Checkpoint state |
Implements gem5::Serializable.
Definition at line 770 of file pmu.cc.
References SERIALIZE_SCALAR.
void gem5::ArmISA::PMU::CounterState::setValue | ( | uint64_t | val | ) |
overwrite the value of the counter
the | new counter value |
Definition at line 570 of file pmu.cc.
References gem5::X86ISA::val.
Referenced by gem5::ArmISA::PMU::setControlReg(), gem5::ArmISA::PMU::setCounterValue(), and gem5::ArmISA::PMU::setMiscReg().
|
overridevirtual |
Unserialize an object.
Read an object's state from the current checkpoint section.
cp | Checkpoint state |
Implements gem5::Serializable.
Definition at line 778 of file pmu.cc.
References UNSERIALIZE_SCALAR.
|
protected |
id of the counter instance
Definition at line 489 of file pmu.hh.
Referenced by debugCounter(), and getCounterId().
bool gem5::ArmISA::PMU::CounterState::enabled |
Is the counter enabled?
Definition at line 479 of file pmu.hh.
Referenced by gem5::ArmISA::PMU::regProbeListeners(), gem5::ArmISA::PMU::updateAllCounters(), and gem5::ArmISA::PMU::updateCounter().
EventTypeId gem5::ArmISA::PMU::CounterState::eventId |
Counter event ID.
Definition at line 473 of file pmu.hh.
Referenced by debugCounter(), gem5::ArmISA::PMU::getCounterTypeRegister(), gem5::ArmISA::PMU::PMU(), gem5::ArmISA::PMU::setCounterTypeRegister(), and gem5::ArmISA::PMU::updateCounter().
PMEVTYPER_t gem5::ArmISA::PMU::CounterState::filter |
Filtering settings (evtCount is unused)
Definition at line 476 of file pmu.hh.
Referenced by gem5::ArmISA::PMU::getCounterTypeRegister(), and gem5::ArmISA::PMU::setCounterTypeRegister().
bool gem5::ArmISA::PMU::CounterState::overflow64 |
|
protected |
|
protected |
PmuEvent currently in use (if any)
Definition at line 486 of file pmu.hh.
Referenced by debugCounter().
|
protected |