JDK-8339800 : Prefer invokeBasic in BootstrapMethodInvokers
  • Type: Sub-task
  • Component: core-libs
  • Sub-Component: java.lang.invoke
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2024-09-09
  • Updated: 2024-09-16
  • Resolved: 2024-09-10
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 24
24 b15Fixed
Description
By replacing invokeExact with invokeBasic in all the type-checked invokes in java.lang.invoke.BootstrapMethodInvokers we get rid of some calls to MethodHandleNatives.linkMethod.

I believe [~jvernee] strongly hinted at this when reviewing some earlier code changes in BootstrapMethodInvoker, but I completely misunderstood the hint and looked in the wrong place. There is a decent, one-off win on various startup tests by doing this.
Comments
Changeset: 0d8e52b3 Branch: master Author: Claes Redestad <redestad@openjdk.org> Date: 2024-09-10 09:46:36 +0000 URL: https://git.openjdk.org/jdk/commit/0d8e52b382432674533c9b80565eadf39ae83c64
10-09-2024

A pull request was submitted for review. Branch: master URL: https://git.openjdk.org/jdk/pull/20926 Date: 2024-09-09 23:52:41 +0000
09-09-2024