On Wed, 5 Nov 2025 21:50:58 GMT, Alex Menkov <[email protected]> wrote:
>> The fix re-implements flat object support in heap dumper.
>> New approach does not require changes in .hprof format.
>> Flat value objects are dumped as heap-allocated objects with generated ID.
>> For heap-allocated objects the ID is their address (oop), they are always
>> aligned.
>> ID generator for flat objects uses unaligned values (so there is no
>> conflicts with oops).
>>
>> HeapDump test was reimplemented (it was disabled for a long time)
>> Changes in hprof test lib were reverted (they are not needed anymore)
>>
>> testing: tier1..4,hs-tier5-svc
>
> 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.
-------------
PR Review Comment:
https://git.openjdk.org/valhalla/pull/1700#discussion_r2499197064