[lworld] Integrated: 8267697: [lworld] [lw3] VM crashes during heap dump if Java heap contains flat arrays
Alex Menkov
amenkov at openjdk.java.net
Mon Sep 13 19:43:27 UTC 2021
On Wed, 8 Sep 2021 23:18:56 GMT, Alex Menkov <amenkov at openjdk.org> wrote:
> Updated HeapDumper to generate HPROF_GC_INSTANCE_DUMP records for inlined objects (flattened fields and flattened arrays).
> Field values of the inlined objects are read directly from container object/array
>
> HPROF_GC_INSTANCE_DUMP record requires unique object ID (for identity objects address of the oop is used).
> To generate it InlinedObjectSupport class is implemented which generates ID as 1,2,3,...
> The idea is to write inlined objects in 2 pass:
> - save state of DumpWriter::inlined_object_support;
> - 1st pass (dumping parent object instance fields or array elements): write inlined object ids (generated by DumpWriter::inlined_object_support);
> - 2nd pass: generate HPROF_GC_INSTANCE_DUMP record for inlined objects using ids from saved inlined_object_support.
>
> 2nd pass works the same way as dumping of parent object, so if inlined objects contain inlined fields HPROF_GC_INSTANCE_DUMP records will be generated for them after dumping of parent object is completed. The process is repeated recursively for all levels of inlined fields nesting.
This pull request has now been integrated.
Changeset: 0c0c9e17
Author: Alex Menkov <amenkov at openjdk.org>
URL: https://git.openjdk.java.net/valhalla/commit/0c0c9e176e3be05ae46a0f8f1722aff879c8d197
Stats: 671 lines in 3 files changed: 631 ins; 3 del; 37 mod
8267697: [lworld] [lw3] VM crashes during heap dump if Java heap contains flat arrays
-------------
PR: https://git.openjdk.java.net/valhalla/pull/548
More information about the valhalla-dev
mailing list