On Fri, 20 Feb 2026 12:44:16 GMT, Ivan Walulya <[email protected]> wrote:

>> src/hotspot/share/gc/serial/serialFullGC.cpp line 397:
>> 
>>> 395:     FlatArrayKlass* faklass = FlatArrayKlass::cast(array->klass());
>>> 396:     mark_and_push_closure.do_klass(faklass->element_klass());
>>> 397:   }
>> 
>> We have talked about this at the office a couple of times, but no sure if we 
>> reached any understanding.
>> 
>> But why do we feel the need for following the element klass in the flat 
>> array case. I understand conceptually that there are no headers with the 
>> element klass to visit here, but how is this different from an empty or all 
>> null reference array?
>> 
>> _PS: I see this code in Serial and G1, but not sure where to find it in 
>> Parallel if it exists._
>> 
>> _PPS: Also what about nested flattened values, (not sure if they occur with 
>> oops in the wild, yet) but it does not seem like we should rely on reaching 
>> the metadata this way. We should ensure that visiting the containers 
>> metadata will visit all its flattened fields/elements metadata._
>
>> PS: I see this code in Serial and G1, but not sure where to find it in 
>> Parallel if it exists.
> 
> I missed this, fixed now.
> 
> For the broader discussion on visiting element klass, in this PR, I just went 
> with matching what happens with the case where we do not split arrays.

Yeah let us not address it in this RFE. But I think it something we need to 
consider, and evaluate what the actual requirements are when we trace through 
the metadata.

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

PR Review Comment: 
https://git.openjdk.org/valhalla/pull/2142#discussion_r2833038641

Reply via email to