-
Notifications
You must be signed in to change notification settings - Fork 739
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
VarHandle Performance #3019
Comments
FYI @andrewcraik |
According to @andrewcraik the work targeted to 0.11.0 is completed. Moving to 0.12.0 for any remaining work. |
liqunl
pushed a commit
to liqunl/openj9
that referenced
this issue
Oct 12, 2018
VarHandle concreate access methods contain information on the field to be accessed, thus the unsafe calls can be transformed into direct memory access or codegen intrinsics. Part of Issue eclipse-openj9#3019 Signed-off-by: Liqun Liu <[email protected]>
acrowthe
pushed a commit
to acrowthe/openj9
that referenced
this issue
Nov 5, 2018
VarHandle concreate access methods contain information on the field to be accessed, thus the unsafe calls can be transformed into direct memory access or codegen intrinsics. Part of Issue eclipse-openj9#3019 Signed-off-by: Liqun Liu <[email protected]>
The expected performance improvements are delivered in the 0.12 milestone. Re-targeting to 0.14 (the next quarterly delivery) for the remaining work. If this happens to complete before the 0.13 (Java 12) milestone the target milestone will be adjusted. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
VarHandle has been added as a feature of Java9, to replace Unsafe.
In openj9, VarHandle is implemented using MethodHandle. In the JIT, we recognize and transform a VarHandle call into an invokeGeneric on a MethodHandle object which is an element of
Varhandle.handleTable
. The invokeGeneric becomes a invokeExact on a MethodHandle after conversion in the trees.In simplified trees, the call is transformed from
to
As stated in http://openjdk.java.net/jeps/193, users of VarHandle is encouraged to store VarHandle objects into static final fields to allow constant folding to fold away some checks.
Currently, our goal is to optimize VarHandle calls on VarHandle instances that are held in static final fields. The following are the main things we need,
Other optimizations include
acall MethodHandle.asType
with conversion trees for invoke generic.asType
will create a new MethodHandle for invoke generic, stopping the JIT from targeted inlining.Changes we have made
#671
#663
#264
#235
#210
#2121
eclipse-omr/omr#1796
The text was updated successfully, but these errors were encountered: