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

8272586: emit abstract machine code in hs-err logs #1446

Conversation

TheRealMDoerr
Copy link
Contributor

@TheRealMDoerr TheRealMDoerr commented Jun 15, 2023

Backport of JDK-8272568 with follow-up fixes (see Commits).

This PR contains the following commits:

  1. JDK-8272586: emit abstract machine code in hs-err logs
    This is the main part. Almost clean. Code move had to be done manually because JavaThread::cast(t) was introduced after JDK17. (JDK17 uses t->as_Java_thread().)
  2. JDK-8275031: runtime/ErrorHandling/MachCodeFramesInErrorFile.java fails when hsdis is present
    Small fix. Clean.
  3. JDK-8277102: Dubious PrintCompilation output
    Basically reverts the timestamp change. Clean.

I'm planning to backport the other follow-up changes separately:

  1. JDK-8274986: max code printed in hs-err logs should be configurable
    Clean but replacement of JavaThread::cast is needed.
  2. JDK-8283056: show abstract machine code in hs-err for all VM crashes
    Clean.

The feature greatly helps analyzing VM crashes.


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issues

  • JDK-8272586: emit abstract machine code in hs-err logs (Enhancement - P4)
  • JDK-8275031: runtime/ErrorHandling/MachCodeFramesInErrorFile.java fails when hsdis is present (Bug - P3)
  • JDK-8277102: Dubious PrintCompilation output (Bug - P5)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk17u-dev.git pull/1446/head:pull/1446
$ git checkout pull/1446

Update a local copy of the PR:
$ git checkout pull/1446
$ git pull https://git.openjdk.org/jdk17u-dev.git pull/1446/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 1446

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk17u-dev/pull/1446.diff

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Jun 15, 2023

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

@TheRealMDoerr TheRealMDoerr changed the title 8272586: emit abstract machine code in hs-err logs Backport b60837a7d5d6f920d2fb968369564df155dc1018 Jun 15, 2023
@openjdk openjdk bot changed the title Backport b60837a7d5d6f920d2fb968369564df155dc1018 8272586: emit abstract machine code in hs-err logs Jun 15, 2023
@openjdk
Copy link

openjdk bot commented Jun 15, 2023

This backport pull request has now been updated with issue from the original commit.

@openjdk openjdk bot added the backport label Jun 15, 2023
@TheRealMDoerr
Copy link
Contributor Author

/issue add 8275031,8277102

@openjdk
Copy link

openjdk bot commented Jun 19, 2023

@TheRealMDoerr
Adding additional issue to issue list: 8275031: runtime/ErrorHandling/MachCodeFramesInErrorFile.java fails when hsdis is present.

Adding additional issue to issue list: 8277102: Dubious PrintCompilation output.

@TheRealMDoerr TheRealMDoerr marked this pull request as ready for review June 19, 2023 13:07
@openjdk openjdk bot added the rfr Pull request is ready for review label Jun 19, 2023
@mlbridge
Copy link

mlbridge bot commented Jun 19, 2023

Webrevs

@openjdk
Copy link

openjdk bot commented Jun 19, 2023

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

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

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

8272586: emit abstract machine code in hs-err logs
8275031: runtime/ErrorHandling/MachCodeFramesInErrorFile.java fails when hsdis is present
8277102: Dubious PrintCompilation output

Reviewed-by: mbaesken

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 2 new commits pushed to the master branch:

  • 55c0eaa: 8272654: Mark word accesses should not use Access API
  • 7697ab4: 8309550: jdk.jfr.internal.Utils::formatDataAmount method should gracefully handle amounts equal to Long.MIN_VALUE

Please see this link for an up-to-date comparison between the source branch of this pull request and the master branch.
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

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

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Jun 19, 2023
@TheRealMDoerr
Copy link
Contributor Author

/integrate

@openjdk
Copy link

openjdk bot commented Jun 20, 2023

Going to push as commit 393aeaf.
Since your change was applied there have been 9 commits pushed to the master branch:

  • d85a847: 8289688: jfr command hangs when it processes invalid file
  • 9780137: 8286481: Exception printed to stdout on Windows when storing transparent image in clipboard
  • 0368ae9: 8306738: Select num workers for safepoint ParallelCleanupTask
  • 249ddf4: 8293252: Shenandoah: ThreadMXBean synchronizer tests crash with aggressive heuristics
  • 5a4e374: 8309959: JFR: Display N/A for missing data amount
  • 6c81bf5: 8295811: serviceability/sa/TestObjectAlignment.java fails on x86_32
  • c6f6db2: 8295657: SA: Allow larger object alignments
  • 55c0eaa: 8272654: Mark word accesses should not use Access API
  • 7697ab4: 8309550: jdk.jfr.internal.Utils::formatDataAmount method should gracefully handle amounts equal to Long.MIN_VALUE

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Jun 20, 2023
@openjdk openjdk bot closed this Jun 20, 2023
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Jun 20, 2023
@openjdk
Copy link

openjdk bot commented Jun 20, 2023

@TheRealMDoerr Pushed as commit 393aeaf.

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

@TheRealMDoerr TheRealMDoerr deleted the 8272586_abstract_machine_code branch June 20, 2023 13:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport integrated Pull request has been integrated
2 participants