RFR: 8317689: [JVMCI] include error message when CreateJavaVM in libgraal fails [v2]
Doug Simon
dnsimon at openjdk.org
Wed Oct 11 21:11:41 UTC 2023
> 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 to return an error message along with an error code by a non-standard `_strerror` argument passed to the `CreateJavaVM` JNI invocation interface function:
>
>
> |---------------|-----------------------------------------------------------------------------------|
> | _strerror | 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. |
> |---------------|-----------------------------------------------------------------------------------|
>
>
> 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
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/16086/files
- new: https://git.openjdk.org/jdk/pull/16086/files/a4592446..8f72f1e0
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=16086&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=16086&range=00-01
Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
Patch: https://git.openjdk.org/jdk/pull/16086.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/16086/head:pull/16086
PR: https://git.openjdk.org/jdk/pull/16086
More information about the hotspot-dev
mailing list