gem5 v25.0.0.1
Loading...
Searching...
No Matches
gem5::ArmISA::PMU::PMUEvent Struct Referenceabstract

Event definition base class. More...

#include <pmu.hh>

Inheritance diagram for gem5::ArmISA::PMU::PMUEvent:
gem5::ArmISA::PMU::RegularEvent gem5::ArmISA::PMU::SWIncrementEvent

Public Member Functions

 PMUEvent (EventTypeId _id, Stats *pmu_stats)
 PMUEvent constructor.
virtual ~PMUEvent ()
void attachEvent (PMU::CounterState *user)
 attach this event to a given counter
void detachEvent (PMU::CounterState *user)
 detach this event from a given counter
virtual void increment (const uint64_t val)
 notify an event increment of val units, all the attached counters' value is incremented by val units.
virtual void enable ()=0
 Enable the current event.
virtual void disable ()=0
 Disable the current event.
virtual void updateAttachedCounters ()
 Method called immediately before a counter access in order for the associated event to update its state (if required)

Protected Attributes

const EventTypeId id
 ID of this event.
Stats *const pmuStats
 True is event is reported as a stat.
std::set< PMU::CounterState * > userCounters
 set of counters using this event

Detailed Description

Event definition base class.

Definition at line 292 of file pmu.hh.

Constructor & Destructor Documentation

◆ PMUEvent()

gem5::ArmISA::PMU::PMUEvent::PMUEvent ( EventTypeId _id,
Stats * pmu_stats )
inline

PMUEvent constructor.

Parameters
idevent_id associated with the PMU event
pmu_statspointer to PMU stats if there is a gem5 stat associated with this event. nullptr otherwise

Definition at line 301 of file pmu.hh.

References id, and pmuStats.

◆ ~PMUEvent()

virtual gem5::ArmISA::PMU::PMUEvent::~PMUEvent ( )
inlinevirtual

Definition at line 305 of file pmu.hh.

Member Function Documentation

◆ attachEvent()

void gem5::ArmISA::PMU::PMUEvent::attachEvent ( PMU::CounterState * user)

attach this event to a given counter

Parameters
apointer to the counter where to attach this event

Definition at line 480 of file pmu.cc.

References enable(), pmuStats, updateAttachedCounters(), and userCounters.

◆ detachEvent()

void gem5::ArmISA::PMU::PMUEvent::detachEvent ( PMU::CounterState * user)

detach this event from a given counter

Parameters
apointer to the counter where to detach this event from

Definition at line 504 of file pmu.cc.

References disable(), pmuStats, and userCounters.

◆ disable()

virtual void gem5::ArmISA::PMU::PMUEvent::disable ( )
pure virtual

Disable the current event.

Implemented in gem5::ArmISA::PMU::RegularEvent, and gem5::ArmISA::PMU::SWIncrementEvent.

Referenced by detachEvent().

◆ enable()

virtual void gem5::ArmISA::PMU::PMUEvent::enable ( )
pure virtual

Enable the current event.

Implemented in gem5::ArmISA::PMU::RegularEvent, and gem5::ArmISA::PMU::SWIncrementEvent.

Referenced by attachEvent().

◆ increment()

void gem5::ArmISA::PMU::PMUEvent::increment ( const uint64_t val)
virtual

notify an event increment of val units, all the attached counters' value is incremented by val units.

Parameters
thequantity by which to increment the attached counter values

Definition at line 492 of file pmu.cc.

References pmuStats, userCounters, and gem5::X86ISA::val.

◆ updateAttachedCounters()

virtual void gem5::ArmISA::PMU::PMUEvent::updateAttachedCounters ( )
inlinevirtual

Method called immediately before a counter access in order for the associated event to update its state (if required)

Definition at line 345 of file pmu.hh.

Referenced by attachEvent().

Member Data Documentation

◆ id

const EventTypeId gem5::ArmISA::PMU::PMUEvent::id
protected

ID of this event.

Definition at line 349 of file pmu.hh.

Referenced by PMUEvent().

◆ pmuStats

Stats* const gem5::ArmISA::PMU::PMUEvent::pmuStats
protected

True is event is reported as a stat.

Definition at line 352 of file pmu.hh.

Referenced by attachEvent(), detachEvent(), increment(), and PMUEvent().

◆ userCounters

std::set<PMU::CounterState*> gem5::ArmISA::PMU::PMUEvent::userCounters
protected

set of counters using this event

Definition at line 355 of file pmu.hh.

Referenced by attachEvent(), detachEvent(), increment(), and gem5::ArmISA::PMU::SWIncrementEvent::write().


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

Generated on Sat Oct 18 2025 08:06:57 for gem5 by doxygen 1.14.0