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

Roman Kennke rkennke at openjdk.org
Tue Sep 10 09:31:09 UTC 2024


On Tue, 10 Sep 2024 08:37:43 GMT, Roman Kennke <rkennke at openjdk.org> wrote:

>>>     could be any value that is not a valid field offset
>> 
>> I understand that that "random value" needs to satisfy this condition.
>
> With compact headers, this value should only be used in C2, and not really as an actual offset. An earlier version of the change had the value in src/hotspot/share/opto/type.hpp instead, and only an assert(!UCOH) in oopDesc::klass_offset_in_bytes(). I think this would be a better solution overall, because it prevents accidental (and wrong) usage of the klass_offset in the runtime. Back then it has been rejected by somebody (don't remember), because it made the C2 diff a little messier, so I kept it like it is now. I would prefer to reinstate it, though.

> (Fwiw, the method is also used during Universe initialization).

Yes, but only in the -UCOH branch.

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

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


More information about the build-dev mailing list