Request for reviews (M): 6580131: Exposing Method Inlining InformationTo JVMTI Agents

Venkatachalam, Vasanth Vasanth.Venkatachalam at amd.com
Tue Oct 6 16:32:43 PDT 2009


Hi Tom, Dan,
Thank you again for your detailed feedback. We have revised our implementation based on your suggestions and submitted new diffs for bugid 100085 with the changes described below. We have attached these diffs and new sample JVMTI agents to the bug report at:

https://bugs.openjdk.java.net/show_bug.cgi?id=100085


We have tested the code on both a 32-bit Windows system and a 64-bit Linux system. We don't know whether these changes will require CCC team approval. We are hoping these changes will get into JDK6 update 20, but if this is not possible we would like to target JDK 7.

Note that this implementation reports inlining information for CompiledMethodLoad events that are not triggered by the GenerateEvents mechanism.
For those that are triggered by GenerateEvents, the void pointer will be initialized to NULL. We can discuss whether to add support for GenerateEvents in a future submission.


1. Overall Structure

Following Tom Rodriguez's suggestion, we made changes so that for every compiled method, the JVM passes a single JvmtiCompiledMethodLoadInlineRecord through the void pointer. This record contains an array of PCStackInfo structs, which give the inlining information for each pc address of that method. In the previous submission, the JVM was instead passing multiple JvmtiCompiledMethodLoadInlineRecords, one for each pc address.

These changes affect jvmticmlr.h (which defines the new data structure) and jvmtiExport.cpp, where we have defined a new method, create_inline_record.

2. Miscellaneous changes

We made the following additional changes requested by Dan Daugherty:

-We modified the naming conventions for structs defined in jvmticmlr.h to make them consistent with the conventions used by JVMTI.
-We added explicit version info major and minor constants to the JvmtiCompiledMethodLoadRecordHeader struct. The JVM initializes these fields to 0 in jvmtiExport.cpp, but this can be changed as needed.
-We have added more detailed comments to the jvmticmlr.h header file, to describe the sequence of events that takes place when a JVMTI agent accesses the void pointer.
-We removed from jvmticmlr.h a comment that referenced JvmtiCompiledMethodLoadRecord, which doesn't exist.
-We changed "int" to "jint" to match types where applicable.
-We removed redundant comments from assertion violations in the create_inline_record method in jvmtiExport.cpp.
-We removed redundant code that was counting the number of stack frames twice in create_inline_record.
-We added an assertion to check for a null sd->method( ) in create_inline_record, as suggested by Tom Rodriguez.


Please let us know if you have any additional questions or concerns. We hope this revision addresses your comments.

Regards,

Vasanth



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/hotspot-dev/attachments/20091006/05dc87c5/attachment.html 


More information about the hotspot-dev mailing list