|
gem5 [DEVELOP-FOR-25.0]
|
ProbeListenerArgFunc generates a listener for the class of Arg and a lambda callback function that is called by the notify. More...
#include <probe.hh>
Public Member Functions | |
| ProbeListenerArgFunc (const std::string &name, const NotifyFunction &func) | |
| void | notify (const Arg &val) override |
| called when the ProbePoint calls notify. | |
Public Member Functions inherited from gem5::ProbeListenerArgBase< Arg > | |
| ProbeListenerArgBase (std::string name) | |
Public Member Functions inherited from gem5::ProbeListener | |
| ProbeListener (std::string _name) | |
| virtual | ~ProbeListener ()=default |
| ProbeListener (const ProbeListener &other)=delete | |
| ProbeListener & | operator= (const ProbeListener &other)=delete |
| ProbeListener (ProbeListener &&other) noexcept=delete | |
| ProbeListener & | operator= (ProbeListener &&other) noexcept=delete |
| const std::string & | getName () const |
Private Types | |
| typedef std::function< void(const Arg &)> | NotifyFunction |
Private Attributes | |
| NotifyFunction | function |
Additional Inherited Members | |
Protected Attributes inherited from gem5::ProbeListener | |
| const std::string | name |
ProbeListenerArgFunc generates a listener for the class of Arg and a lambda callback function that is called by the notify.
Note that the function is passed as lambda function on construction Example: ProbeListenerArgFunc<MyArg> (myobj->getProbeManager(), "MyProbePointName", [this](const MyArg &arg) { my_own_func(arg, xyz...); // do something with arg }));
|
private |
|
inline |
| obj | the class of type Tcontaining the method to call on notify. |
| pm | A probe manager that is not part of the obj |
| name | the name of the ProbePoint to add this listener to. |
| func | a pointer to the function on obj (called on notify). |
Definition at line 364 of file probe.hh.
References function, gem5::ProbeListener::name, and gem5::ProbeListenerArgBase< Arg >::ProbeListenerArgBase().
|
inlineoverridevirtual |
called when the ProbePoint calls notify.
This is a shim through to the function passed during construction.
| val | the argument value to pass. |
Implements gem5::ProbeListenerArgBase< Arg >.
Definition at line 373 of file probe.hh.
References function, and gem5::X86ISA::val.
|
private |
Definition at line 355 of file probe.hh.
Referenced by notify(), and ProbeListenerArgFunc().