The MethodEntry method of the IJavaEventMonitor interface is called by the Microsoft VM to notify the profiler when a Java method is about to be entered. The Microsoft VM passes in a MethodID for this method and a StackID for this method's stack frame. The profiler must manually keep track of each StackID to determine which method is about to exit (notified by MethodExit or MethodExit2).
HRESULT MethodEntry(MethodID method_id, StackID stack_id);
[in] method_id | The MethodID for this method. |
[in] stack_id | The StackID for this method call. |
The profiler can call the MethodInformation method implemented by the Microsoft VM to retrieve information about this MethodID. In particular, MethodInformation will return the class name for this method, the ClassID for the class containing this method, source line information, and the execution model for this method (interpreted, fast-interpreted, JIT-compiled, native Win32, or COM). Depending on the execution model, a profiler application can call InterpretedMethodInformation to retrieve the interpreted bytecodes for an interpreted method or JITCompiledMethodInformation to retrieve the JIT code for a JIT-compiled method.