RFR: 8293650: Shenandoah: Support archived heap objects [v4]

Aleksey Shipilev shade at openjdk.org
Wed Aug 14 10:01:09 UTC 2024


On Tue, 13 Aug 2024 19:47:51 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

>> src/hotspot/share/cds/archiveHeapWriter.hpp line 126:
>> 
>>> 124:   // depends on -Xmx, but can never be smaller than 1 * M.
>>> 125:   // (TODO: Perhaps change to 256K to be compatible with Shenandoah)
>>> 126:   static constexpr int MIN_GC_REGION_ALIGNMENT = 1 * M;
>> 
>> Couldn't you just move up the constant to the public section?
>> Also, I'm not sure what's the point of it being constexpr (rather that just const), but that is pre-existing.
>
> Yeah, I had problems with that. But I think I just misplaced the constant the last time around. Let me see what Windows GHA runs have to say about the code in new commit.

Ah, now I remember the real reason I did this: I needed the constant out of the `#if INCLUDE_CDS_JAVA_HEAP` block. `INCLUDE_CDS_JAVA_HEAP` is only defined for `#if INCLUDE_CDS && INCLUDE_G1GC && defined(_LP64)`. So it breaks 32-bit builds. This will become moot after we remove Shenandoah check for region alignment, so I just worked it around in Shenandoah code now.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/20468#discussion_r1716648043


More information about the shenandoah-dev mailing list