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

8323058: Revisit j.l.classfile.CodeBuilder API surface #17282

Closed
wants to merge 16 commits into from

Conversation

asotona
Copy link
Member

@asotona asotona commented Jan 5, 2024

java.lang.classfile.CodeBuilder contains more than 230 API methods.
Existing ClassFile API use cases proved the concept one big CodeBuilder is comfortable. However there are some redundancies, glitches in the naming conventions, some frequently used methods are hard to find and some methods have low practical use.

This patch revisits the CodeBuilder API methods and introduces some changes.

For more details, please, visit the CSR

Please review.

Thank you,
Adam


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
  • Change requires CSR request JDK-8323067 to be approved

Issues

  • JDK-8323058: Revisit j.l.classfile.CodeBuilder API surface (Enhancement - P3)
  • JDK-8323067: Revisit j.l.classfile.CodeBuilder API surface (CSR)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 17282

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

Using diff file

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

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Jan 5, 2024

👋 Welcome back asotona! 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 openjdk bot added the csr Pull request needs approved CSR before integration label Jan 5, 2024
@openjdk
Copy link

openjdk bot commented Jan 5, 2024

@asotona The following labels will be automatically applied to this pull request:

  • core-libs
  • hotspot-jfr

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

@openjdk openjdk bot added core-libs core-libs-dev@openjdk.org hotspot-jfr hotspot-jfr-dev@openjdk.org labels Jan 5, 2024
@openjdk
Copy link

openjdk bot commented Feb 1, 2024

@asotona this pull request can not be integrated into master due to one or more merge conflicts. To resolve these merge conflicts and update this pull request you can run the following commands in the local repository for your personal fork:

git checkout JDK-8323058-CodeBuilder
git fetch https://git.openjdk.org/jdk.git master
git merge FETCH_HEAD
# resolve conflicts and follow the instructions given by git merge
git commit -m "Merge master"
git push

@openjdk openjdk bot added the merge-conflict Pull request has merge conflict with target branch label Feb 1, 2024
# Conflicts:
#	src/java.base/share/classes/java/lang/runtime/SwitchBootstraps.java
#	src/jdk.jlink/share/classes/jdk/tools/jlink/internal/plugins/SystemModulesPlugin.java
@openjdk openjdk bot removed the merge-conflict Pull request has merge conflict with target branch label Feb 1, 2024
@asotona asotona marked this pull request as ready for review February 1, 2024 13:05
@openjdk openjdk bot added the rfr Pull request is ready for review label Feb 1, 2024
@mlbridge
Copy link

mlbridge bot commented Feb 1, 2024

Webrevs

Copy link
Member

@egahlin egahlin left a comment

Choose a reason for hiding this comment

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

JFR part (EventInstrumentation.java) looks good.

@bridgekeeper
Copy link

bridgekeeper bot commented Mar 5, 2024

@asotona 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!

@liach
Copy link
Member

liach commented Mar 6, 2024

Looking at 8326836 #18030, we might need @since tags on the new API methods.

@asotona
Copy link
Member Author

asotona commented Mar 6, 2024

Looking at 8326836 #18030, we might need @since tags on the new API methods.

Thanks for pointing it out, I've added them.

@openjdk
Copy link

openjdk bot commented Mar 13, 2024

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

8323058: Revisit j.l.classfile.CodeBuilder API surface

Reviewed-by: briangoetz, psandoz

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 1 new commit pushed to the master branch:

  • 4036d7d: 8330076: NMT: add/make a mandatory MEMFLAGS argument to family of os::reserve/commit/uncommit memory API

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 merge-conflict Pull request has merge conflict with target branch and removed rfr Pull request is ready for review labels Apr 10, 2024
@bridgekeeper
Copy link

bridgekeeper bot commented Apr 11, 2024

@asotona 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!

# Conflicts:
#	src/java.base/share/classes/java/lang/runtime/SwitchBootstraps.java
#	test/jdk/jdk/classfile/helpers/RebuildingTransformation.java
@openjdk openjdk bot added rfr Pull request is ready for review and removed merge-conflict Pull request has merge conflict with target branch labels Apr 15, 2024
@openjdk openjdk bot added ready Pull request is ready to be integrated and removed csr Pull request needs approved CSR before integration labels May 1, 2024
@asotona
Copy link
Member Author

asotona commented May 2, 2024

/integrate

@openjdk
Copy link

openjdk bot commented May 2, 2024

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

  • 286cbf8: 8331546: Build failure after 8330076
  • fe23068: 8331392: G1: Make HRPrinter distinguish between different types of reclamation
  • 33243d4: 8331394: G1: Remove SKIP_RETIRED_FULL_REGIONS define in G1HRPrinter
  • 8bcd2e6: 8329088: Stack chunk thawing races with concurrent GC stack iteration
  • c4fe5bf: 8331405: Shenandoah: Optimize ShenandoahLock with TTAS
  • dd906ff: 8331399: RISC-V: Don't us mv instead of la
  • d3bf526: 8331518: Tests should not use the "Classpath" exception form of the legal header
  • 4036d7d: 8330076: NMT: add/make a mandatory MEMFLAGS argument to family of os::reserve/commit/uncommit memory API

Your commit was automatically rebased without conflicts.

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

openjdk bot commented May 2, 2024

@asotona Pushed as commit ae82405.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core-libs core-libs-dev@openjdk.org hotspot-jfr hotspot-jfr-dev@openjdk.org integrated Pull request has been integrated
Development

Successfully merging this pull request may close these issues.

5 participants