gem5  v22.0.0.0
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Member Functions | Private Attributes | List of all members
gem5::ProbePointArg< Arg > Class Template Reference

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

#include <thermal_domain.hh>

Public Member Functions

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

Private Attributes

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

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 54 of file thermal_domain.hh.

Constructor & Destructor Documentation

◆ ProbePointArg()

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

Definition at line 269 of file probe.hh.

Member Function Documentation

◆ addListener()

template<typename Arg >
void gem5::ProbePointArg< Arg >::addListener ( ProbeListener l)
inlineoverride

adds a ProbeListener to this ProbePoints notify list.

Parameters
lthe ProbeListener to add to the notify list.

Definition at line 288 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 281 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 313 of file probe.hh.

Referenced by gem5::o3::Fetch::finishTranslation(), and gem5::o3::Fetch::recvReqRetry().

◆ removeListener()

template<typename Arg >
void gem5::ProbePointArg< Arg >::removeListener ( ProbeListener l)
inlineoverride

remove a ProbeListener from this ProbePoints notify list.

Parameters
lthe ProbeListener to remove from the notify list.

Definition at line 302 of file probe.hh.

Member Data Documentation

◆ listeners

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

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

Generated on Thu Jun 16 2022 10:42:41 for gem5 by doxygen 1.8.17