RFR: 8317689: [JVMCI] include error message when CreateJavaVM in libgraal fails [v2]
Peter Hofer
phofer at openjdk.org
Thu Oct 12 09:09:19 UTC 2023
On Wed, 11 Oct 2023 21:11:41 GMT, Doug Simon <dnsimon at openjdk.org> wrote:
>> Creating a new libgraal isolate can fail for a number of reasons. Currently, all that one sees on such a failure is a numeric error code. For example:
>>
>>
>> 2096 20291 4 java.lang.CharacterData::of (136 bytes)
>> 2096 20291 4 java.lang.CharacterData::of (136 bytes) COMPILE SKIPPED: Error attaching to libjvmci (err: -1000000024)
>>
>>
>> Native Image is being [enhanced](https://github.com/oracle/graal/pull/7590/files#diff-bbd89cfdcf392cf7086e19898a19e85ddf820f2f1f52eec989223304aab77947R210-R213) to return an error message along with an error code by a non-standard `_createvm_errorstr` argument passed to the `CreateJavaVM` JNI invocation interface function:
>>
>>
>> |--------------------|-----------------------------------------------------------------------------------|
>> | _createvm_errorstr | extraInfo is a "const char**" value. |
>> | | If CreateJavaVM returns non-zero, then extraInfo is assigned a newly malloc'ed |
>> | | 0-terminated C string describing the error if a description is available, |
>> | | otherwise extraInfo is set to null. |
>> |--------------------|-----------------------------------------------------------------------------------|
>>
>>
>> This PR updates JVMCI to take advantage of this Native Image enhancement.
>>
>> This is sample `-XX:+PrintCompilation` output from testing this PR on libgraal:
>>
>> 2096 20291 4 java.lang.CharacterData::of (136 bytes)
>> 2096 20291 4 java.lang.CharacterData::of (136 bytes) COMPILE SKIPPED: Error attaching to libjvmci (err: -1000000024, Image page size is incompatible with run-time page size. Rebuild image with -H:PageSize=[pagesize] to set appropriately.)
>
> Doug Simon has updated the pull request incrementally with one additional commit since the last revision:
>
> renamed _strerror to _createvm_errorstr
Marked as reviewed by phofer (no project role).
-------------
PR Review: https://git.openjdk.org/jdk/pull/16086#pullrequestreview-1673669271
More information about the hotspot-dev
mailing list