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

8204267: Generate comments in -XX:+PrintInterpreter to link to source code #2957

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sendaoYan
Copy link
Member

@sendaoYan sendaoYan commented Oct 19, 2024

Hi all,
HotSpot's interpreter is dynamically generated (by C++ sources such as src/hotspot/cpu/x86/templateTable_x86.cpp).

The command java -XX:+PrintInterpreter can be used to print a disassembly of the HotSpot interpreter. However, the output has very little comment, and it's very hard to associate the assembler instructions with the C++ code that generates them.

To make it easier to understand the -XX:+PrintInterpreter, we should generate comments to link the instructions back to the C++ source code that generates them. This is doable because much of the interpreter code generation is done via a macro "__". We can redefine this macro to generate comments.

The file src/hotspot/share/compiler/disassembler.cpp has different context cause this PR can't backport cleanly, all other files are backport cleanly.

Only change the behavior of PrintInterpreter, risk is low.

Additional testing:

  • linux x64 build with fastdebug and slowdebug configure
  • linux x64 jtreg tests(include tier1/2/3 etc.) with release build
  • linux aarch64 jtreg tests(include tier1/2/3 etc.) with release build

Thanks.


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
  • JDK-8204267 needs maintainer approval

Issue

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

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 2957

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

Using diff file

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

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Oct 19, 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 19, 2024

❗ This change is not yet ready to be integrated.
See the Progress checklist in the description for automated requirements.

@openjdk openjdk bot changed the title Backport b5f0945a726722dc92b0a10cc30723faa05ee475 8204267: Generate comments in -XX:+PrintInterpreter to link to source code Oct 19, 2024
@openjdk
Copy link

openjdk bot commented Oct 19, 2024

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

@openjdk openjdk bot added backport rfr Pull request is ready for review labels Oct 19, 2024
@mlbridge
Copy link

mlbridge bot commented Oct 19, 2024

Webrevs

@bridgekeeper
Copy link

bridgekeeper bot commented Nov 16, 2024

@sendaoYan This pull request has been inactive for more than 4 weeks and will be automatically closed if another 4 weeks passes without any activity. To avoid this, simply add a new comment to the pull request. Feel free to ask for assistance if you need help with progressing this pull request towards integration!

@sendaoYan
Copy link
Member Author

Hi, can anyone take look this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport rfr Pull request is ready for review
Development

Successfully merging this pull request may close these issues.

1 participant