Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8267697: [lworld] [lw3] VM crashes during heap dump if Java heap contains flat arrays #548

wants to merge 1 commit into from


Copy link

@alexmenkov alexmenkov commented Sep 8, 2021

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.


  • Change must not contain extraneous whitespace


  • JDK-8267697: [lworld] [lw3] VM crashes during heap dump if Java heap contains flat arrays


Using git

Checkout this PR locally:
$ git fetch pull/548/head:pull/548
$ git checkout pull/548

Update a local copy of the PR:
$ git checkout pull/548
$ git pull pull/548/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 548

View PR using the GUI difftool:
$ git pr show -t 548

Using diff file

Download this PR as a diff file:

Copy link

@bridgekeeper bridgekeeper bot commented Sep 8, 2021

👋 Welcome back amenkov! A progress list of the required criteria for merging this PR into lworld will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

Copy link

@openjdk openjdk bot commented Sep 8, 2021

@alexmenkov This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file for details.

After integration, the commit message for the final commit will be:

8267697: [lworld] [lw3] VM crashes during heap dump if Java heap contains flat arrays

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been no new commits pushed to the lworld branch. If another commit should be pushed before you perform the /integrate command, your PR will be automatically rebased. If you prefer to avoid any potential automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the lworld branch, type /integrate in a new comment.

Copy link

@mlbridge mlbridge bot commented Sep 8, 2021


Copy link

@alexmenkov alexmenkov commented Sep 13, 2021


Copy link

@openjdk openjdk bot commented Sep 13, 2021

Going to push as commit 0c0c9e1.
Since your change was applied there have been 2 commits pushed to the lworld branch:

  • 3111124: 8273554: [lworld] Runtime tests should not explicitly set -Xint/-Xcomp
  • 252b04b: 8273323: [lworld] Fix post-parse call devirtualization with inline type receiver

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot closed this Sep 13, 2021
@openjdk openjdk bot added integrated and removed ready rfr labels Sep 13, 2021
Copy link

@openjdk openjdk bot commented Sep 13, 2021

@alexmenkov Pushed as commit 0c0c9e1.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

@alexmenkov alexmenkov deleted the heapDumper branch Sep 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
1 participant