Sharing the markword (aka Valhalla's markword use)

John Rose john.r.rose at oracle.com
Mon Mar 11 17:25:18 UTC 2024


Thanks, David; I wondered when Klass::prototype_header came and went.

Thomas, a peek at klass.hpp shows that Klass::prototype_header has 
returned to us in Lilliput, with helpers like oopDesc::init_mark.  Nice. 
  That looks like a good way to manage Valhalla’s new hoisted metadata 
bits as well as other header bits.

On 11 Mar 2024, at 1:55, Thomas Stüfe wrote:

> In Lilliput, the prototype header contains the nKlass ID.
>
> Cheers, Thomas
>
> On Mon, Mar 11, 2024 at 2:23 AM David Holmes 
> <david.holmes at oracle.com>
> wrote:
>
>> On 10/03/2024 1:38 pm, John Rose wrote:
>>> What Dan said.  Here’s more color commentary:
>> <snip>
>>> I suggest adding, to Klass itself, a field which is a prototype
>>> header for the object, with all the right bits in place ...
>>> (I thought we already had something like this somewhere, but
>>> a quick check came up empty…)
>>
>> We used to have the biased-locking prototype header.
>>
>> klass.hpp
>>    // Biased locking support
>>    // Note: the prototype header is always set up to be at least the
>>    // prototype markOop. If biased locking is enabled it may further 
>> be
>>    // biasable and have an epoch.
>>    markOop prototype_header() const      { return _prototype_header; 
>> }
>>
>> Cheers,
>> David
>>
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/valhalla-dev/attachments/20240311/53a600c8/attachment.htm>


More information about the valhalla-dev mailing list