gem5 v24.0.0.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 (ProbeManager *pm, 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 (ProbeManager *pm, const std::string &name) | |
Public Member Functions inherited from gem5::ProbeListener | |
ProbeListener (ProbeManager *manager, const std::string &name) | |
virtual | ~ProbeListener () |
ProbeListener (const ProbeListener &other)=delete | |
ProbeListener & | operator= (const ProbeListener &other)=delete |
ProbeListener (ProbeListener &&other) noexcept=delete | |
ProbeListener & | operator= (ProbeListener &&other) noexcept=delete |
Private Types | |
typedef std::function< void(const Arg &)> | NotifyFunction |
Private Attributes | |
NotifyFunction | function |
Additional Inherited Members | |
Protected Attributes inherited from gem5::ProbeListener | |
ProbeManager *const | manager |
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). |
|
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 358 of file probe.hh.
References gem5::ProbeListenerArgFunc< Arg >::function, and gem5::X86ISA::val.
|
private |
Definition at line 338 of file probe.hh.
Referenced by gem5::ProbeListenerArgFunc< Arg >::notify().