RFR: 8298601: Refactor archiving of java.lang.Module objects [v2]
Ioi Lam
iklam at openjdk.org
Thu Dec 22 21:50:01 UTC 2022
> This RFE is a prerequisite for [JDK-8296344: Remove dependency on G1 for writing the CDS archive heap](https://bugs.openjdk.org/browse/JDK-8296344).
>
> The main change of this RFE is in `HeapShared::archive_reachable_objects_from()`. We avoid the use of "archived objects" in the interface between CDS and the module system, and use integer "root indices" instead. (See note [1] in [JDK-8298600](https://bugs.openjdk.org/browse/JDK-8298600).)
>
> Also, for better encapsulation, the module-specific code has been moved from `HeapShared::check_module_oop()` to the three new functions in modules.cpp.
>
> ----
>
> Besides the refactoring, this RFE also tightens up the code that deals with `java.lang.Module` oops and the corresponding C++ `ModuleEntry` objects.
>
> As this is admittedly an obscured area of the CDS archive heap, I've added the following:
>
> - Assertions to make sure that when an oop is archived, the corresponding C++ object is also archived, and vice-versa.
> - More comments
Ioi Lam has updated the pull request incrementally with one additional commit since the last revision:
review from @coleenp and @calvinccheung
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/11715/files
- new: https://git.openjdk.org/jdk/pull/11715/files/43b53906..b7dd89ea
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=11715&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=11715&range=00-01
Stats: 41 lines in 4 files changed: 6 ins; 20 del; 15 mod
Patch: https://git.openjdk.org/jdk/pull/11715.diff
Fetch: git fetch https://git.openjdk.org/jdk pull/11715/head:pull/11715
PR: https://git.openjdk.org/jdk/pull/11715
More information about the hotspot-runtime-dev
mailing list