RFR: 8305895: Implement JEP 450: Compact Object Headers (Experimental) [v9]
Coleen Phillimore
coleenp at openjdk.org
Fri Sep 20 19:02:49 UTC 2024
On Wed, 18 Sep 2024 12:54:34 GMT, Roman Kennke <rkennke at openjdk.org> wrote:
>> src/hotspot/share/oops/markWord.inline.hpp line 90:
>>
>>> 88: ShouldNotReachHere();
>>> 89: return markWord();
>>> 90: #endif
>>
>> Is the ifdef _LP64 necessary, since UseCompactObjectHeaders should always be false for 32 bits?
>
> Kindof. The problem is that klass_shift is larger than 31, and shifting with it would thus be UB and generate a compiler warning. I opted to simply not compile any of that code in 32bit builds. We could also define klass_shift differently on 32bit.
> Long-term (maybe with Lilliput2/4-byte-headers?) it would be nice to consolidate the header layout between 32 and 64 bit builds and not make any distinction anywhere. E.g. define markWord (or objectHeader?) in a single way, and use that to extract all the relevant stuff. It's not totally unlikely that we deprecate 32-bit builds before that can happen, though.
Ok.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/20677#discussion_r1769069007
More information about the serviceability-dev
mailing list