RFR: 8327495: Print more warning with -Xshare:auto when CDS fails to use archive [v4]

Calvin Cheung ccheung at openjdk.org
Tue Apr 29 23:42:27 UTC 2025


> Before this change, if the `-Xshare:auto` is specified with a CDS archive, the user won't see the following error message when the archive has failed to load:
> `An error has occurred while processing the the shared archive file.`
> This change will print the above error message if the `-Xshare:auto` is specified and the archive is not the default one.
> Several existing `log_ino(cds)()` calls have been changed to calling the new function `MetaspaceShared::report_loading_error()`. Also modified couple of tests to check the above error message is printed.
> 
> Passed tiers 1 - 3 testing.

Calvin Cheung has updated the pull request incrementally with one additional commit since the last revision:

  @iklam patch; change more error reporting to use MetaspaceShared::report_loading_error(); use CDSConfig::type_of_archive_being_loaded() instead of 'CDS archive'; adjust some tests

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/24889/files
  - new: https://git.openjdk.org/jdk/pull/24889/files/75c3165c..f108bc5a

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=24889&range=03
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=24889&range=02-03

  Stats: 55 lines in 9 files changed: 16 ins; 6 del; 33 mod
  Patch: https://git.openjdk.org/jdk/pull/24889.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/24889/head:pull/24889

PR: https://git.openjdk.org/jdk/pull/24889


More information about the hotspot-runtime-dev mailing list