RFR: 8305895: Implement JEP 450: Compact Object Headers (Experimental) [v5]

Roman Kennke rkennke at openjdk.org
Mon Sep 9 13:31:10 UTC 2024


On Thu, 22 Aug 2024 19:50:21 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:

>> Roman Kennke has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Fix hash shift for 32 bit builds
>
> src/hotspot/share/gc/shared/gcForwarding.hpp line 36:
> 
>> 34:  * Implements forwarding for the full-GCs of Serial, Parallel, G1 and Shenandoah in
>> 35:  * a way that preserves upper N bits of object mark-words, which contain crucial
>> 36:  * Klass* information when running with compact headers. The encoding is similar to
> 
> This doc suggests this forwarding is only for compact-header so I wonder if we can check `UseCompactObjectHeaders` directly instead of heap-size in `GCForwarding::initialize`.

Right. The original implementation was more complex and then the consensus was to not sprinkle UseCompactHeaders all over the place, but with that new/simpler implementation it makes sense to simply check the UCOH flag.

> src/hotspot/share/gc/shared/gcForwarding.hpp line 40:
> 
>> 38:  * heap-base, shifts that difference into the right place, and sets the lowest two
>> 39:  * bits (to indicate 'forwarded' state as usual).
>> 40:  */
> 
>> "can use 40 bits for forwardee encoding. That's enough for 8TB of heap."
> 
> I feel this 8T-constraint is significant and should be in the doc.

Done.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/20677#discussion_r1750264571
PR Review Comment: https://git.openjdk.org/jdk/pull/20677#discussion_r1750265026


More information about the serviceability-dev mailing list