On Fri, 24 Oct 2025 00:57:03 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

src/hotspot/share/services/heapDumper.cpp line 1818:

> 1816: void JavaStackRefDumper::dump_java_stack_refs(StackValueCollection* 
> values) {
> 1817:   for (int index = 0; index < values->size(); index++) {
> 1818:     // TODO: can it be T_FLAT_ELEMENT?

The BasicType T_FLAT_ELEMENT is used exclusively in the context of flat arrays: 
in the layout_helper of flat arrays, and in a few array methods like 
arrayOopDesc::base_offset_in_bytes().
T_FLAT_ELEMENT cannot be used to describe the type of a field, the type of the 
argument of a Java method or the type of a value on the stack.

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

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

Reply via email to