RFR: 8280353: -XX:ArchiveClassesAtExit should print warning if base archive failed to load

Yumin Qi minqi at openjdk.java.net
Thu Jan 27 05:01:46 UTC 2022


Hi, Please review

Before fix of 8261455 (https://bugs.openjdk.java.net/browse/JDK-8261455), when -XX:ArchiveClassesAtExit=<archive_name> used to dump dynamic archive, if base archive failed to load due to some reason with 'auto'  share mode, the process exit with information like:

Error occurred during initialization of VM
-XX:ArchiveClassesAtExit is unsupported when base CDS archive is not loaded. Run with -Xlog:cds for more info.

This behavior is not correct. Under 'auto' mode, if shared archive failed to map, CDS should be disabled and run without sharing.
After the fix of 8261455, the behavior is correct: if base archive failed to load under 'auto' mode, CDS is disabled and continue without sharing. Print out VM warning if -XX:ArchiveClassesAtExit=<archive_name> in option to do dynamic dump, the archive will not be created.

Tests: tier1,tier4
Also manually execute the examples in bug description.

Thanks
Yumin

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

Commit messages:
 - 8280353: -XX:ArchiveClassesAtExit should print warning if base archive failed to load

Changes: https://git.openjdk.java.net/jdk/pull/7241/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=7241&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8280353
  Stats: 3 lines in 1 file changed: 3 ins; 0 del; 0 mod
  Patch: https://git.openjdk.java.net/jdk/pull/7241.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/7241/head:pull/7241

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


More information about the hotspot-runtime-dev mailing list