RFR: 8254799: runtime/ErrorHandling/TestHeapDumpOnOutOfMemoryError.java fails with release VMs

Daniel D.Daugherty dcubed at openjdk.java.net
Thu Oct 15 00:48:15 UTC 2020


On Wed, 14 Oct 2020 23:45:52 GMT, Jie Fu <jiefu 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.

Changes requested by dcubed (Reviewer).

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().

-------------

PR: https://git.openjdk.java.net/jdk/pull/673


More information about the hotspot-runtime-dev mailing list