[lworld] RFR: 8341771: [lworld] Heap dump recognizing new flat fields formats [v2]

Alex Menkov amenkov at openjdk.org
Thu Nov 6 19:33:30 UTC 2025


On Thu, 6 Nov 2025 14:35:49 GMT, Frederic Parain <fparain at openjdk.org> wrote:

>> Alex Menkov has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   removed T_FLAT_ELEMENT in StackRefDumper
>
> src/hotspot/share/services/heapDumper.cpp line 1445:
> 
>> 1443:   int type_size;
>> 1444:   if (type == T_OBJECT || type == T_FLAT_ELEMENT) {
>> 1445:     type_size = sizeof(address);
> 
> Array elements size is not always sizeof(address) for flat arrays (could be smaller or bigger).
> The real size of the array elements can be retrieved using the element_byte_size() method in FlatArrayKlass.

This is element size in the array dump, not in memory.
Elements of flat arrays are dumped as heap-allocated objects, i.e. each element in the dump is represented by object ID, ObjectID size is sizeof(address).

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

PR Review Comment: https://git.openjdk.org/valhalla/pull/1700#discussion_r2500534040


More information about the valhalla-dev mailing list