Delegate OnMethodCompiledCallback
A callback which is called when a method is compiled by the JIT.
public delegate void OnMethodCompiledCallback(RuntimeMethodHandle methodHandle, MethodBase? method, nint codeStart, nint codeRw, ulong codeSize)
Parameters
methodHandleRuntimeMethodHandle- The RuntimeMethodHandle of the method which was compiled.
methodMethodBase- A MethodBase representing the method, if one could be found.
codeStartnint- A pointer to the start of the method code. This only represents the final location which the code will exist at.
codeRwnint- A pointer to the start of the read/write capable code. This contains the actual code data.
codeSizeulong- The size of the code.
- Extension Methods
Remarks
On some runtimes, codeStart != codeRw. When this is the case, codeRw contains the actual body, which will
be copied to codeStart after the hook returns.