RFR: 8279997: check_for_dynamic_dump should not exit vm

Calvin Cheung ccheung at openjdk.java.net
Fri Feb 11 02:03:08 UTC 2022


On Thu, 10 Feb 2022 20:40:31 GMT, Yumin Qi <minqi at openjdk.org> wrote:

> Hi, please review
>   When run with -Xshare:auto and the base archive could not be loaded, vm should not exit in DynamicArchive::check_for_dynamic_dump, instead, it should continue without sharing.
>   The fix is the run will continue but print out warning to remind user of using -Xlog:cds for more information.
> 
> Tests: tier1,tier4
> 
> Thanks
> Yumin

Looks good. Some nits on the tests.

test/hotspot/jtreg/runtime/cds/appcds/dynamicArchive/ArchiveConsistency.java line 221:

> 219:             });
> 220: 
> 221:         startTest("10. -XX:SharedArchiveFile=" + topArchiveName + " -XX:ArchiveClassesAtExit=" + getNewArchiveName("top3"));

Should this be `startTest("11. ...` ?

test/hotspot/jtreg/runtime/cds/appcds/dynamicArchive/SharedArchiveFileOption.java line 192:

> 190:             "-XX:+RecordDynamicDumpInfo",
> 191:             "-Xlog:cds+dynamic=debug",
> 192:             "-cp", appJar, mainClass)

This change seems unnecessary.

test/hotspot/jtreg/runtime/cds/appcds/dynamicArchive/SharedArchiveFileOption.java line 207:

> 205:             .assertNormalExit(output -> {
> 206:                 output.shouldNotMatch("\\[cds,dynamic");
> 207:                 output.shouldContain("-XX:ArchiveClassesAtExit is unsupported when base CDS archive is not loaded");

You could use the `ERROR` defined at line 199 above.

test/hotspot/jtreg/runtime/cds/appcds/dynamicArchive/SharedArchiveFileOption.java line 218:

> 216:             .assertNormalExit(output -> {
> 217:                 output.shouldNotMatch("\\[cds,dynamic");
> 218:                 output.shouldContain("-XX:ArchiveClassesAtExit is unsupported when base CDS archive is not loaded");

You could use the `ERROR` defined at line 199 above.

test/hotspot/jtreg/runtime/cds/appcds/dynamicArchive/SharedArchiveFileOption.java line 229:

> 227:                   "-Xlog:cds",
> 228:                   "-cp", appJar, mainClass)
> 229:             .assertAbnormalExit("Cannot use the following option when dumping the shared archive: --patch-module");

This change is unnecessary.

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

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


More information about the hotspot-runtime-dev mailing list