On Thu, 26 Mar 2026 21:45:55 GMT, David Holmes <[email protected]> wrote:

>> Stefan Karlsson has updated the pull request incrementally with one 
>> additional commit since the last revision:
>> 
>>   Change the functions to take an Object[] as the argument
>
> src/hotspot/share/prims/jvm.cpp line 564:
> 
>> 562:   Klass* klass = o->klass();
>> 563: 
>> 564:   return klass->is_flatArray_klass();
> 
> Given the definition:
> 
> #ifdef _LP64
> bool oopDesc::is_flatArray() const {
>   markWord mrk = mark();
>   return (mrk.is_unlocked()) ? mrk.is_flat_array() : 
> klass()->is_flatArray_klass();
> }
> 
> I think this needs to retain the original form and not call 
> `is_flatArray_klass` directly.

I don't think it does. The mark word is just another way to query the 
information that we get from by querying the class.

In fact, I have a prototype that completely removes these `functions` from the 
mark word and let all C++ code go through the Klass pointer. This cuts down on 
the complexity and some of the risks of those bits being unstable while 
inflating object monitors. Left are the JIT compilers using those bits, and 
having to navigate around the locking code.

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

PR Review Comment: 
https://git.openjdk.org/valhalla/pull/2261#discussion_r2999265351

Reply via email to