RFR: 8298612: Refactor archiving of java String objects [v2]
Ioi Lam
iklam at openjdk.org
Wed Jan 25 05:15:11 UTC 2023
> This is the last prerequisite PR for [JDK-8296344](https://bugs.openjdk.org/browse/JDK-8296344) (Remove dependency on G1 for writing the CDS archive heap).
>
> The old `StringTable::write_to_archive()` violates requirements [1] and [2] as stated in [JDK-8298600](https://bugs.openjdk.org/browse/JDK-8298600).
>
> In the new implementation, copying of strings into the archive has been moved inside of heapShared.cpp. Now we no longer expose the `HeapShared::archive_object()` API. This addresses requirement [1].
>
> Also, we no longer hand-assemble the String object and its internal `value` array. Instead, we use `HeapShared::archive_reachable_objects_from` to recursively copy the `value`. This addresses requirement [2].
>
> Test: tiers 1-4.
Ioi Lam 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 five additional commits since the last revision:
- Merge branch 'master' into 8298612-refactor-archiving-of-java-string-objects
- added set_deduplication_forbidden back
- renamed functions
- changed NULL to nullptr
- refactored the writing of interned strings
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/12173/files
- new: https://git.openjdk.org/jdk/pull/12173/files/757e0467..2c939684
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=12173&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=12173&range=00-01
Stats: 694 lines in 25 files changed: 103 ins; 504 del; 87 mod
Patch: https://git.openjdk.org/jdk/pull/12173.diff
Fetch: git fetch https://git.openjdk.org/jdk pull/12173/head:pull/12173
PR: https://git.openjdk.org/jdk/pull/12173
More information about the hotspot-runtime-dev
mailing list