gem5 [DEVELOP-FOR-25.0]
Loading...
Searching...
No Matches
gem5::ProbePointArg< Arg > Class Template Reference

ProbePointArg generates a point for the class of Arg. More...

#include <probe.hh>

Inheritance diagram for gem5::ProbePointArg< Arg >:
gem5::ProbePoint

Public Member Functions

 ProbePointArg (ProbeManager *manager, std::string name)
 
bool hasListeners () const
 Informs whether any listeners are attached to this probe.
 
void addListener (ProbeListener *l_base) override
 adds a ProbeListener to this ProbePoints notify list.
 
void removeListener (ProbeListener *l_base) override
 remove a ProbeListener from this ProbePoints notify list.
 
void notify (const Arg &arg)
 called at the ProbePoint call site, passes arg to each listener.
 
- Public Member Functions inherited from gem5::ProbePoint
 ProbePoint (ProbeManager *manager, const std::string &name)
 
virtual ~ProbePoint ()
 
const std::string & getName () const
 

Private Attributes

std::vector< ProbeListenerArgBase< Arg > * > listeners
 The attached listeners.
 

Additional Inherited Members

- Protected Attributes inherited from gem5::ProbePoint
const std::string name
 

Detailed Description

template<typename Arg>
class gem5::ProbePointArg< Arg >

ProbePointArg generates a point for the class of Arg.

As ProbePointArgs talk directly to ProbeListenerArgs of the same type, we can store the vector of ProbeListeners as their Arg type (and not as base type).

Methods are provided to addListener, removeListener and notify.

Definition at line 272 of file probe.hh.

Constructor & Destructor Documentation

◆ ProbePointArg()

template<typename Arg>
gem5::ProbePointArg< Arg >::ProbePointArg ( ProbeManager * manager,
std::string name )
inline

Definition at line 278 of file probe.hh.

Member Function Documentation

◆ addListener()

template<typename Arg>
void gem5::ProbePointArg< Arg >::addListener ( ProbeListener * l_base)
inlineoverridevirtual

adds a ProbeListener to this ProbePoints notify list.

Parameters
lthe ProbeListener to add to the notify list.

Implements gem5::ProbePoint.

Definition at line 297 of file probe.hh.

◆ hasListeners()

template<typename Arg>
bool gem5::ProbePointArg< Arg >::hasListeners ( ) const
inline

Informs whether any listeners are attached to this probe.

This can be used to avoid performing costly tasks needed by the probe when nobody is listening.

Returns
Whether this probe has any listener.

Definition at line 290 of file probe.hh.

◆ notify()

template<typename Arg>
void gem5::ProbePointArg< Arg >::notify ( const Arg & arg)
inline

called at the ProbePoint call site, passes arg to each listener.

Parameters
argthe argument to pass to each listener.

Definition at line 330 of file probe.hh.

◆ removeListener()

template<typename Arg>
void gem5::ProbePointArg< Arg >::removeListener ( ProbeListener * l_base)
inlineoverridevirtual

remove a ProbeListener from this ProbePoints notify list.

Parameters
lthe ProbeListener to remove from the notify list.

Implements gem5::ProbePoint.

Definition at line 315 of file probe.hh.

Member Data Documentation

◆ listeners

template<typename Arg>
std::vector<ProbeListenerArgBase<Arg> *> gem5::ProbePointArg< Arg >::listeners
private

The attached listeners.

Definition at line 275 of file probe.hh.


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

Generated on Mon May 26 2025 09:19:24 for gem5 by doxygen 1.13.2