#include <public/sourcepawn/sp_vm_api.h>
Public Member Functions | |
| virtual void | OnNativeBegin (IPluginContext *pContext, sp_native_t *native)=0 |
| Invoked by the JIT to notify that a native is being started. | |
| virtual void | OnNativeEnd ()=0 |
| Invoked by the JIT to notify that the last native on the stack is no longer being executed. | |
| virtual void | OnFunctionBegin (IPluginContext *pContext, const char *name)=0 |
| Invoked by the JIT to notify that a function call is starting. | |
| virtual void | OnFunctionEnd ()=0 |
| Invoked by the JIT to notify that the last function call has concluded. In the case of an error inside a function, this will not be called. Instead, the VM will call OnCallbackEnd() and the profiler stack must be unwound. | |
| virtual int | OnCallbackBegin (IPluginContext *pContext, sp_public_t *pubfunc)=0 |
| Invoked by the VM to notify that a forward/callback is starting. | |
| virtual void | OnCallbackEnd (int serial)=0 |
| Invoked by the JIT to notify that a callback has ended. | |
Definition at line 978 of file sp_vm_api.h.
| virtual void SourcePawn::IProfiler::OnNativeBegin | ( | IPluginContext * | pContext, | |
| sp_native_t * | native | |||
| ) | [pure virtual] |
Invoked by the JIT to notify that a native is being started.
| pContext | Plugin context. | |
| native | Native information. |
| virtual void SourcePawn::IProfiler::OnFunctionBegin | ( | IPluginContext * | pContext, | |
| const char * | name | |||
| ) | [pure virtual] |
Invoked by the JIT to notify that a function call is starting.
| pContext | Plugin context. | |
| name | Function name, or NULL if not known. | |
| code_addr | P-Code address. |
| virtual int SourcePawn::IProfiler::OnCallbackBegin | ( | IPluginContext * | pContext, | |
| sp_public_t * | pubfunc | |||
| ) | [pure virtual] |
Invoked by the VM to notify that a forward/callback is starting.
| pContext | Plugin context. | |
| pubfunc | Public function information. |
| virtual void SourcePawn::IProfiler::OnCallbackEnd | ( | int | serial | ) | [pure virtual] |
Invoked by the JIT to notify that a callback has ended.
As noted in OnFunctionEnd(), this my be called with a misaligned profiler stack. To correct this, the stack should be unwound (discarding data as appropriate) to a matching serial number.
| serial | Unique number from OnCallbackBegin(). |
1.5.1