RFR: 8305895: Implementation: JEP 450: Compact Object Headers (Experimental) [v13]

Coleen Phillimore coleenp at openjdk.org
Fri May 12 17:42:15 UTC 2023


On Fri, 12 May 2023 16:51:07 GMT, Roman Kennke <rkennke at openjdk.org> wrote:

>> src/hotspot/share/oops/klass.cpp line 207:
>> 
>>> 205:   return prototype;
>>> 206: }
>>> 207: 
>> 
>> This seems like a useful change without UseCompactObjectHeaders as an enhancement and to remove some conditional code.  Since we have storage in Klass for it anyway.
>
> Why? This code used to be there with BiasedLocking, and has been removed. I've re-instated it for compact object headers, because the prototype mark for an object now depends on its Klass, but other than that, why would it be useful? The prototype would be just markWord::prototype().

I thought not to waste a 64 bit field in Klass and to maybe eliminate some if (CompactObjectHeaders) use the one in Klass else use MarkWord::prototype(), just always use the one in Klass.  Minimizing if (CompactObjectHeaders) would be a good thing. At any case, this isn't for this change, just an idea to try to use this field unconditionally.  I recognize it from BiasedLocking.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/13844#discussion_r1192642191


More information about the hotspot-dev mailing list