On Thu, 15 Oct 2026 23:52:02 GMT, Yasumasa Suenaga <[email protected]> wrote:
> Valhalla introduced flattened value object, however SA cannot dump it into
> heapdump e.g. `jhsdb jmap --binaryheap`.
> Actually HeapHprofBinWriter.java has following lines. Hence the user cannot
> check flattened object from heapdump generated by SA.
>
>
> case JVM_SIGNATURE_CLASS:
> case JVM_SIGNATURE_ARRAY: {
> if (field.isFlat()) {
> // FIXME - we don't handle flattened fields yet. Just treat them
> // as a null reference. See JDK-8381370.
> writeObjectID(null);
>
>
> 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).
This pull request has now been integrated.
Changeset: 15de87f5
Author: Yasumasa Suenaga <[email protected]>
URL:
https://git.openjdk.org/jdk/commit/15de87f5cbcfbd535e4b0a17740283c437cc2264
Stats: 388 lines in 8 files changed: 344 ins; 2 del; 42 mod
8381370: SA is not writing out flattened fields to the hprof file
8394812: Test sun/tools/jhsdb/HeapDumpTestWithActiveProcess.java failed:
java.lang.NullPointerException: Cannot invoke
"sun.jvm.hotspot.oops.Oop.getHandle()" because the return value of
"sun.jvm.hotspot.oops.FlatArray.getObjAt(long)" is null
Reviewed-by: cjplummer, sspitsyn
-------------
PR: https://git.openjdk.org/jdk/pull/33395