gem5 [DEVELOP-FOR-25.0]
Loading...
Searching...
No Matches
gem5::ProbeManager Class Reference

ProbeManager is a conduit class that lives on each SimObject, and is used to match up probe listeners with probe points. More...

#include <probe.hh>

Inheritance diagram for gem5::ProbeManager:
gem5::Named

Public Member Functions

 ProbeManager (const std::string &obj_name)
 
virtual ~ProbeManager ()
 
bool addListener (std::string_view point_name, ProbeListener &listener)
 Add a ProbeListener to the ProbePoint named by pointName.
 
bool removeListener (std::string_view point_name, ProbeListener &listener)
 Remove a ProbeListener from the ProbePoint named by pointName.
 
void addPoint (ProbePoint &point)
 Add a ProbePoint to this SimObject ProbeManager.
 
ProbePointgetFirstProbePoint (std::string_view point_name) const
 
template<typename Listener, typename... Args>
ProbeListenerPtr< Listener > connect (Args &&...args)
 
- Public Member Functions inherited from gem5::Named
 Named (std::string_view name_)
 
virtual ~Named ()=default
 
virtual std::string name () const
 

Private Attributes

std::vector< ProbePoint * > points
 Vector for name look-up.
 

Detailed Description

ProbeManager is a conduit class that lives on each SimObject, and is used to match up probe listeners with probe points.

Definition at line 161 of file probe.hh.

Constructor & Destructor Documentation

◆ ProbeManager()

gem5::ProbeManager::ProbeManager ( const std::string & obj_name)
inline

Definition at line 168 of file probe.hh.

References gem5::Named::Named().

◆ ~ProbeManager()

virtual gem5::ProbeManager::~ProbeManager ( )
inlinevirtual

Definition at line 169 of file probe.hh.

Member Function Documentation

◆ addListener()

bool gem5::ProbeManager::addListener ( std::string_view point_name,
ProbeListener & listener )

Add a ProbeListener to the ProbePoint named by pointName.

If the name doesn't resolve a ProbePoint return false.

Parameters
point_namename of the ProbePoint to add the ProbeListener to.
listenerthe ProbeListener to add.
Returns
true if added, false otherwise.

Definition at line 57 of file probe.cc.

References DPRINTFR, gem5::Named::name(), gem5::MipsISA::p, and points.

Referenced by connect().

◆ addPoint()

void gem5::ProbeManager::addPoint ( ProbePoint & point)

Add a ProbePoint to this SimObject ProbeManager.

Parameters
pointthe ProbePoint to add.

Definition at line 96 of file probe.cc.

References DPRINTFR, getFirstProbePoint(), gem5::ProbePoint::getName(), gem5::Named::name(), and points.

Referenced by gem5::ProbePoint::ProbePoint().

◆ connect()

template<typename Listener, typename... Args>
ProbeListenerPtr< Listener > gem5::ProbeManager::connect ( Args &&... args)
inline

◆ getFirstProbePoint()

ProbePoint * gem5::ProbeManager::getFirstProbePoint ( std::string_view point_name) const

Definition at line 110 of file probe.cc.

References gem5::MipsISA::p, and points.

Referenced by addPoint(), and gem5::ArmISA::PMU::RegularEvent::enable().

◆ removeListener()

bool gem5::ProbeManager::removeListener ( std::string_view point_name,
ProbeListener & listener )

Remove a ProbeListener from the ProbePoint named by pointName.

If the name doesn't resolve a ProbePoint return false.

Parameters
point_namethe name of the ProbePoint to remove the ProbeListener from.
listenerthe ProbeListener to remove.
Returns
true if removed, false otherwise.

Definition at line 76 of file probe.cc.

References DPRINTFR, gem5::Named::name(), gem5::MipsISA::p, and points.

Member Data Documentation

◆ points

std::vector<ProbePoint *> gem5::ProbeManager::points
private

Vector for name look-up.

Definition at line 165 of file probe.hh.

Referenced by addListener(), addPoint(), getFirstProbePoint(), and removeListener().


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