OpenJdk interpreter

Nagy Mostafa nagy.mostafa at gmail.com
Thu Jul 3 11:11:02 PDT 2008


Thanks, Tim.
Yes, I know I can use JVMTI for the task, but I also wanted to collect
call-site and some other specific info (e.g. field access) information. Can
the JVM pass information about call site bytecode index/pointer to JVMTI ?

- nagy

On Wed, Jul 2, 2008 at 3:05 PM, Tim Bell <Tim.Bell at sun.com> wrote:

> Nagy1981 wrote:
>
>> Hi, 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?
>
>  http://java.sun.com/javase/6/docs/platform/jvmti/jvmti.html#MethodEntry
>
> Does this supply the functionality you need?  It would be easier to write a
> JVM TI agent [1] 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
> void JvmtiExport::post_method_entry()
>
> 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
>
> [1] The JVM Tool Interface (JVM TI): How VM Agents Work
>    http://java.sun.com/developer/technicalArticles/J2SE/jvm_ti/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/hotspot-dev/attachments/20080703/06085fae/attachment.html 


More information about the hotspot-dev mailing list