RFR: 8254799: runtime/ErrorHandling/TestHeapDumpOnOutOfMemoryError.java fails with release VMs
Daniel D.Daugherty
dcubed at openjdk.java.net
Thu Oct 15 00:51:11 UTC 2020
On Thu, 15 Oct 2020 00:41:33 GMT, Daniel D. Daugherty <dcubed at openjdk.org> wrote:
>> runtime/ErrorHandling/TestHeapDumpOnOutOfMemoryError.java and
>> runtime/ErrorHandling/TestHeapDumpOnOutOfMemoryErrorInMetaspace.java fail with release VMs due to VerifyDependencies is
>> develop and is available only in debug version of VM.
>> -XX:+IgnoreUnrecognizedVMOptions is added to fix it.
>
> test/hotspot/jtreg/runtime/ErrorHandling/TestHeapDumpOnOutOfMemoryError.java line 82:
>
>> 80: "-XX:MaxMetaspaceSize=16m",
>> 81: "-XX:+IgnoreUnrecognizedVMOptions",
>> 82: "-XX:-VerifyDependencies",
>
> Instead of adding "-XX:+IgnoreUnrecognizedVMOptions", you can
> check the JDK type like this:
>
> String jdkType = System.getProperty("jdk.debug", "release");
> boolean addNonReleaseOptions = false;
> if (!jdkType.equals("release")) {
> addNonReleaseOptions = true;
> }
>
> and then only include the "-XX:-VerifyDependencies" option
> when `addNonReleaseOptions` is true... I'm not sure how to
> do optional parameters with ProcessTools.createJavaProcessBuilder().
I didn't know about `Platform.isDebugBuild()`...
-------------
PR: https://git.openjdk.java.net/jdk/pull/673
More information about the hotspot-runtime-dev
mailing list