RFR: 8338011: CDS archived heap object support for 64-bit Windows
Calvin Cheung
ccheung at openjdk.org
Fri Aug 9 18:18:33 UTC 2024
On Thu, 8 Aug 2024 19:16:20 GMT, Ioi Lam <iklam at openjdk.org> wrote:
> We didn't support CDS archived heap object on Windows because
>
> - The Windows implementation of `os::map_memory()` cannot map the contents of a file into a region that's already reserved by the garbage collector.
> - We had a high failure rate for mapping the CDS archive on Windows due to ASLR, sometimes as high as 50%. So it didn't seem worth the effort (mainly testing) to support archived heap objects on Windows.
>
> Both of the above issues were fixed in [JDK-8231610](https://bugs.openjdk.org/browse/JDK-8231610), so we should add the support to Windows now.
>
> (Tested on Oracle CI tiers 1-7)
Looks good.
src/hotspot/share/cds/heapShared.cpp line 1557:
> 1555: // At runtime, these classes are initialized before X's archived fields
> 1556: // are restored by HeapShared::initialize_from_archived_subgraph().
> 1557: int i;
This cleanup seems unrelated to the fix but I think it's fine to include it.
-------------
Marked as reviewed by ccheung (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/20514#pullrequestreview-2230802915
PR Review Comment: https://git.openjdk.org/jdk/pull/20514#discussion_r1711944103
More information about the hotspot-dev
mailing list