43#include "debug/ProbeVerbose.hh"
44#include "params/ProbeListenerObject.hh"
58 const ProbeListenerObjectParams ¶ms)
60 manager(params.manager->getProbeManager())
73 : manager(_manager),
name(_name)
86 DPRINTFR(ProbeVerbose,
"Probes: Call to addListener to \"%s\" on %s.\n",
90 if ((*p)->getName() == point_name) {
91 (*p)->addListener(&listener);
96 DPRINTFR(ProbeVerbose,
"Probes: Call to addListener to \"%s\" on "
97 "%s failed, no such point.\n", point_name,
object->
name());
105 DPRINTFR(ProbeVerbose,
"Probes: Call to removeListener from \"%s\" on "
107 bool removed =
false;
109 if ((*p)->getName() == point_name) {
110 (*p)->removeListener(&listener);
115 DPRINTFR(ProbeVerbose,
"Probes: Call to removeListener from \"%s\" "
116 "on %s failed, no such point.\n", point_name,
object->
name());
124 DPRINTFR(ProbeVerbose,
"Probes: Call to addPoint \"%s\" to %s.\n",
128 if ((*p)->getName() == point.
getName()) {
129 DPRINTFR(ProbeVerbose,
"Probes: Call to addPoint \"%s\" to %s "
virtual std::string name() const
ProbeListenerObject(const ProbeListenerObjectParams ¶ms)
virtual ~ProbeListenerObject()
std::vector< ProbeListener * > listeners
ProbeListener base class; here to simplify things like containers containing multiple types of ProbeL...
ProbeManager *const manager
ProbeListener(ProbeManager *manager, const std::string &name)
ProbeManager is a conduit class that lives on each SimObject, and is used to match up probe listeners...
bool addListener(std::string point_name, ProbeListener &listener)
Add a ProbeListener to the ProbePoint named by pointName.
bool removeListener(std::string point_name, ProbeListener &listener)
Remove a ProbeListener from the ProbePoint named by pointName.
void addPoint(ProbePoint &point)
Add a ProbePoint to this SimObject ProbeManager.
std::vector< ProbePoint * > points
Vector for name look-up.
GEM5_CLASS_VAR_USED const SimObject * object
Required for sensible debug messages.
ProbeListener base class; again used to simplify use of ProbePoints in containers and used as to defi...
ProbePoint(ProbeManager *manager, const std::string &name)
std::string getName() const
Abstract superclass for simulation objects.
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
const std::string & name()