Tim.Bell at Sun.COM
Wed Jul 2 15:05:46 PDT 2008
> I am trying to modify the hotspot interpreter to collect some profile data.
> The main thing I want to do is build a call-tree. I want to add a hook to
> the interpreter whenever an invoke_* bytecode operation is about to execute
> such that my call-tree gets updated. Can you please guide me to the part of
> the code where control is passed from the interpreter to the assembly code
> corresponding to a bytecode operation. All I can find is parts where the
> assembly code get generated, but I can't figure out where it is executed.
Have you looked at the javadoc for the JVMTI_EVENT_METHOD_ENTRY event?
Does this supply the functionality you need? It would be easier to write a JVM TI agent  to
collect this information than it would be to modify the interpreter.
If you still want to modify the JVM code, read over jvmtiExport.cpp. Look for
If you still want to modify the JVM, look over the code base for calls to post_method_entry()
and that should give you an idea where to start.
Hope this helps - Tim Bell
 The JVM Tool Interface (JVM TI): How VM Agents Work
More information about the hotspot-dev