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

8265079: Implement VarHandle invoker caching #3439

Closed
wants to merge 4 commits into from

Conversation

@JornVernee
Copy link
Member

@JornVernee JornVernee commented Apr 12, 2021

This patch implements 2 leftover TODOs for implementing var handle invoker MH caching (lambda forms for those were already shared/cached).

This piggybacks on the existing mechanism for method handle invoker caching.

Testing: Local testing java/lang/invoke tests. Tier 1-3

Thanks,
Jorn


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed

Issue

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/3439/head:pull/3439
$ git checkout pull/3439

Update a local copy of the PR:
$ git checkout pull/3439
$ git pull https://git.openjdk.java.net/jdk pull/3439/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 3439

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/3439.diff

@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented Apr 12, 2021

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

Loading

@openjdk
Copy link

@openjdk openjdk bot commented Apr 12, 2021

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

  • core-libs

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.

Loading

@openjdk openjdk bot added the core-libs label Apr 12, 2021
@JornVernee JornVernee marked this pull request as ready for review Apr 13, 2021
@openjdk openjdk bot added the rfr label Apr 13, 2021
@mlbridge
Copy link

@mlbridge mlbridge bot commented Apr 13, 2021

Loading

cl4es
cl4es approved these changes Apr 13, 2021
Copy link
Member

@cl4es cl4es left a comment

LGTM

MethodHandles.varHandle(Exact)Invoker might be somewhat obscure, but caching them like this is straightforward and basically free.

Loading

@openjdk
Copy link

@openjdk openjdk bot commented Apr 13, 2021

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

8265079: Implement VarHandle invoker caching

Reviewed-by: redestad, vlivanov, psandoz, mchung

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

  • b64a3fb: 8265325: Optimize StubRoutines::dpow() for Math.pow(x, 0.5)
  • d1c8c9e: 8197811: Test java/awt/Choice/PopupPosTest/PopupPosTest.java fails on Windows
  • 7d01c98: 8265414: Variable assigned but not used in G1FreeHumongousRegionClosure
  • d9e19f1: 8265226: (dc) API note in DatagramChannel.open should link to StandardProtocolFamily.UNIX
  • 49b9e68: 8262165: NMT report should state how many callsites had been skipped
  • e390e55: 8265066: Split ReservedSpace constructor to avoid default parameter
  • c607d12: 8249528: Remove obsolete comment in G1RootProcessor::process_java_roots
  • fa58aae: 8265245: depChecker_ don't have any functionalities
  • a2b0e0f: 8265323: Leftover local variables in PcDesc
  • 1ac25b8: 8264372: Threads::destroy_vm only ever returns true
  • ... and 105 more: https://git.openjdk.java.net/jdk/compare/125184e96f577bbc031c3eba40b185b2b728b2c7...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.

Loading

@openjdk openjdk bot added the ready label Apr 13, 2021
Copy link

@iwanowww iwanowww left a comment

Looks good.

Loading

- Use boolean instead of index for var handle cache
@JornVernee
Copy link
Member Author

@JornVernee JornVernee commented Apr 13, 2021

Thanks for the reviews. Comment addressed.

Loading

cl4es
cl4es approved these changes Apr 14, 2021
test/jdk/java/lang/invoke/TestVHInvokerCaching.java Outdated Show resolved Hide resolved
Loading
@JornVernee
Copy link
Member Author

@JornVernee JornVernee commented Apr 19, 2021

/integrate

Loading

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

@openjdk openjdk bot commented Apr 19, 2021

@JornVernee Since your change was applied there have been 115 commits pushed to the master branch:

  • b64a3fb: 8265325: Optimize StubRoutines::dpow() for Math.pow(x, 0.5)
  • d1c8c9e: 8197811: Test java/awt/Choice/PopupPosTest/PopupPosTest.java fails on Windows
  • 7d01c98: 8265414: Variable assigned but not used in G1FreeHumongousRegionClosure
  • d9e19f1: 8265226: (dc) API note in DatagramChannel.open should link to StandardProtocolFamily.UNIX
  • 49b9e68: 8262165: NMT report should state how many callsites had been skipped
  • e390e55: 8265066: Split ReservedSpace constructor to avoid default parameter
  • c607d12: 8249528: Remove obsolete comment in G1RootProcessor::process_java_roots
  • fa58aae: 8265245: depChecker_ don't have any functionalities
  • a2b0e0f: 8265323: Leftover local variables in PcDesc
  • 1ac25b8: 8264372: Threads::destroy_vm only ever returns true
  • ... and 105 more: https://git.openjdk.java.net/jdk/compare/125184e96f577bbc031c3eba40b185b2b728b2c7...master

Your commit was automatically rebased without conflicts.

Pushed as commit c887148.

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

Loading

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
5 participants