Skip to content

8341688: Aarch64: Generate comments in -XX:+PrintInterpreter to link to source code #21400

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

Closed
wants to merge 1 commit into from

Conversation

sendaoYan
Copy link
Member

@sendaoYan sendaoYan commented Oct 8, 2024

Hi all,
The command "java -XX:+UnlockDiagnosticVMOptions -XX:+PrintInterpreter" can be used to print a disassembly of the HotSpot interpreter.
In JDK-8204267, the interpreter generate comments to link the instructions back to the C++ source code that generates them, but the releated PR only support x86 backend, I think it's doable on aarch64 either.

Additonal testing:

  • aarch64 native build with slowdebug and fastdebug
  • jtreg tests(include tier1/tier2/tier3 etc.) with release build

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

Issue

  • JDK-8341688: Aarch64: Generate comments in -XX:+PrintInterpreter to link to source code (Enhancement - P4)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/21400/head:pull/21400
$ git checkout pull/21400

Update a local copy of the PR:
$ git checkout pull/21400
$ git pull https://git.openjdk.org/jdk.git pull/21400/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 21400

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/21400.diff

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Oct 8, 2024

👋 Welcome back syan! 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.

@openjdk
Copy link

openjdk bot commented Oct 8, 2024

@sendaoYan 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:

8341688: Aarch64: Generate comments in -XX:+PrintInterpreter to link to source code

Reviewed-by: aph, jsjolen, jwaters

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

  • d3f3c6a: 8330157: C2: Add a stress flag for bailouts
  • d809bc0: 8341658: RISC-V: Test DateFormatProviderTest.java run timeouted
  • de90204: 8341588: Remove CollectionUsageThreshold.java from ProblemList-Xcomp for debugging
  • f276f58: 8341803: ProblemList containers/docker/TestJcmdWithSideCar.java on linux-x64
  • 7eab0a5: 8337066: Repeated call of StringBuffer.reverse with double byte string returns wrong result
  • 62acc9c: 8341548: More concise use of classfile API
  • 7312eea: 8341131: Some jdk/jfr/event/compiler tests shouldn't be executed with Xcomp
  • 966eb72: 8341447: Open source closed frame tests # 5
  • b9db74a: 8341378: Open source few TrayIcon tests - Set8
  • 6546353: 8340203: Link color is hard to distinguish from text color in API documentation
  • ... and 9 more: https://git.openjdk.org/jdk/compare/45a6359588996d25e5e8dadebdcd8d6a00ef786f...master

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 rfr Pull request is ready for review label Oct 8, 2024
@openjdk
Copy link

openjdk bot commented Oct 8, 2024

@sendaoYan The following label will be automatically applied to this pull request:

  • hotspot

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@mlbridge
Copy link

mlbridge bot commented Oct 8, 2024

Webrevs

@sendaoYan
Copy link
Member Author

Test command java -Xint -XX:+PrintInterpreter -version output before this PR:
jdk24-aarch64.log

Test command java -Xint -XX:+PrintInterpreter -version output after this PR:
jdk24-aarch64-jbs8341688.log

Copy link
Contributor

@theRealAph theRealAph left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sweet! Is that really all there is to it? :-)

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Oct 8, 2024
Copy link
Contributor

@jdksjolen jdksjolen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks. I'm OK with the added comments to the set_vtos_enry_points function.

@sendaoYan
Copy link
Member Author

Sweet! Is that really all there is to it? :-)

I think so, the option -XX:+PrintInterpreter only print 200+ bytecode's assemble.

Copy link
Contributor

@TheShermanTanker TheShermanTanker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One has to wonder why this wasn't done earlier if the implementation was already there and enabling it simply required writing a simple hook into the assembler

@theRealAph
Copy link
Contributor

One has to wonder why this wasn't done earlier if the implementation was already there and enabling it simply required writing a simple hook into the assembler

https://mail.openjdk.org/pipermail/hotspot-dev/2018-June/032711.html didn't include AArch64 code. AArch64 wasn't a priority at the time, and many x86 changes never reached the AArch64 back end.

@sendaoYan
Copy link
Member Author

Thanks all for the review.
/integrate

@openjdk
Copy link

openjdk bot commented Oct 9, 2024

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

  • d3f3c6a: 8330157: C2: Add a stress flag for bailouts
  • d809bc0: 8341658: RISC-V: Test DateFormatProviderTest.java run timeouted
  • de90204: 8341588: Remove CollectionUsageThreshold.java from ProblemList-Xcomp for debugging
  • f276f58: 8341803: ProblemList containers/docker/TestJcmdWithSideCar.java on linux-x64
  • 7eab0a5: 8337066: Repeated call of StringBuffer.reverse with double byte string returns wrong result
  • 62acc9c: 8341548: More concise use of classfile API
  • 7312eea: 8341131: Some jdk/jfr/event/compiler tests shouldn't be executed with Xcomp
  • 966eb72: 8341447: Open source closed frame tests # 5
  • b9db74a: 8341378: Open source few TrayIcon tests - Set8
  • 6546353: 8340203: Link color is hard to distinguish from text color in API documentation
  • ... and 9 more: https://git.openjdk.org/jdk/compare/45a6359588996d25e5e8dadebdcd8d6a00ef786f...master

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Oct 9, 2024

@sendaoYan Pushed as commit d636e0d.

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

@sendaoYan sendaoYan deleted the jbs8341688 branch October 11, 2024 07:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hotspot [email protected] integrated Pull request has been integrated
Development

Successfully merging this pull request may close these issues.

4 participants