RFR: 8306582: Remove MetaspaceShared::exit_after_static_dump() [v5]
Matias Saavedra Silva
matsaave at openjdk.org
Tue Aug 1 21:08:05 UTC 2023
> Currently we exit the VM after static dumping with `MetaspaceShared::exit_after_static_dump()`.
>
>
> // We have finished dumping the static archive. At this point, there may be pending VM
> // operations. We have changed some global states (such as vmClasses::_klasses) that
> // may cause these VM operations to fail. For safety, forget these operations and
> // exit the VM directly.
> void MetaspaceShared::exit_after_static_dump() {
> os::_exit(0);
> }
>
>
> As the comment suggests, the VM state is altered when preparing and performing the static dump, so this change aims to prevent these state changes so the VM can exit normally after the static dump completes. There are three major aspects to this change:
> 1. Since the resolved references array in the Constant Pool is altered when preparing for a static dump, a "scratch copy" is created and archived instead
> 2. Symbols are sorted by address and have their hash recalculated. Similarly to point 1, the copies of the symbols that are to be archived have their hashes updated as opposed to the originals.
> 3. The handling of -Xshare:dump during argument parsing such that the VM can continue and exit normally with an exit code of 0.
>
> Verified with tier 1-9 tests.
Matias Saavedra Silva has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains ten additional commits since the last revision:
- Merge branch 'master' into remove_exit_after_dump_8306582
- Calvin comment
- Ioi comments
- Refactored KlassToOopHandleTable, Ioi and Alan comments
- Merge fix
- Restores java loaders
- Ioi and David comments
- Windows fix
- 8306582: Remove MetaspaceShared::exit_after_static_dump()
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/14879/files
- new: https://git.openjdk.org/jdk/pull/14879/files/64d8c638..f4f9091a
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=14879&range=04
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=14879&range=03-04
Stats: 9132 lines in 289 files changed: 4715 ins; 2001 del; 2416 mod
Patch: https://git.openjdk.org/jdk/pull/14879.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/14879/head:pull/14879
PR: https://git.openjdk.org/jdk/pull/14879
More information about the core-libs-dev
mailing list