RFR: 8309065: Move the logic to determine archive heap location from CDS to G1 GC

Ioi Lam iklam at openjdk.org
Wed May 31 05:50:55 UTC 2023


On Mon, 29 May 2023 21:15:33 GMT, Ashutosh Mehra <duke at openjdk.org> wrote:

> This patch is the first step towards having a single set of GC APIs for allocating heap space for the archived objects (See https://bugs.openjdk.org/browse/JDK-8296263).
> It moves some of the G1 specific logic from CDS to G1 gc without changing the functionality.
> 
> Changes that add/update GC APIs for handling archive heap would be introduced in upcoming patches.

Hi Ashutosh, I've started to test your patch and so far it looks good. I tried dumping with -Xmx128m and running with -Xmx{128, 256, 512m} and no heap relocation is needed. This is the same as before, so I think the logic is unchanged.

With larger heaps (e.g. -Xmx8g), we always relocate, but that's the same as before your change. I've filed a bug for it [JDK-8309170](https://bugs.openjdk.org/browse/JDK-8309170)

`FileMapInfo::heap_region_mapped_address()` was a round-about way of calculating the bottom address of the mapped region. You new code has simplified the logic so this function is no longer needed. It can be removed.

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

PR Comment: https://git.openjdk.org/jdk/pull/14208#issuecomment-1569533869


More information about the hotspot-dev mailing list