On Wed, 30 Sep 2026 05:58:22 GMT, Yasumasa Suenaga <[email protected]> wrote:

>> Valhalla introduced new array type which hosts flattened value object, 
>> however SA cannot inspect it.
>> Actually `FlatArray.iterateFields()` has following lines:
>> 
>> 
>> for (int index = 0; index < length; index++) {
>>     // FIXME - call visitor.doXXX() for each component of each value object
>> }
>> 
>> 
>> This PR addressed it.
>> 
>> ---------
>> - [x] I confirm that I make this contribution in accordance with the 
>> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai).
>
> @sspitsyn @plummercj 
> Could you review this PR?

Hi @YaSuenag , I went through this one since my stack chunk change (#32637) 
lands in the same place. revptrs there walks every object, and on master 
getValue() asks each field isFlat() while the element fields ObjArray hands out 
have no field info, so it trips on the first object array. Your isArray check 
avoids that, my test only passes on top of this PR. The chunk slots are 
instance fields, those answer isFlat() themselves on my side.

Two things I wasn't sure about while reading. FlatArray is an ObjArray now, 
does the heap dump writer then take a flat array down the object array path and 
read the payload as oop handles? And the index * elementSize in FlatArray looks 
like int math, is a flat array past 2G of payload something SA should handle?

If you have a moment for #32637 that would be great, Chris is out until mid 
October and suggested we look at each other's.

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

PR Comment: https://git.openjdk.org/jdk/pull/32849#issuecomment-6011618133

Reply via email to