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

Optimize OpenJDK VarHandle operation methods #19234

Merged
merged 1 commit into from
May 21, 2024

Conversation

nbhuiyan
Copy link
Member

@nbhuiyan nbhuiyan commented Mar 26, 2024

VarHandle operation methods are mostly calls to Unsafe methods, which under certain circumstances can be folded into simple loads and stores in UnsafeFastPath as we can determine the object base and offsets at compile time. In other cases, we can unlock the fast paths for the Unsafe operations by setting the appropriate flags for CodeGen to inline the intrinsics if the platform supports the operations.

In draft state while I perform further testing and performance investigations.

@nbhuiyan nbhuiyan added comp:jit project:MH Used to track Method Handles related work labels Mar 27, 2024
@nbhuiyan nbhuiyan force-pushed the vh-acc-opts branch 3 times, most recently from e385fbb to 75359b3 Compare April 2, 2024 20:28
@nbhuiyan nbhuiyan marked this pull request as ready for review April 3, 2024 19:24
@nbhuiyan nbhuiyan requested a review from dsouzai as a code owner April 3, 2024 19:24
@nbhuiyan
Copy link
Member Author

nbhuiyan commented Apr 3, 2024

@jdmpapin requesting review.

runtime/compiler/env/j9method.cpp Outdated Show resolved Hide resolved
runtime/compiler/optimizer/UnsafeFastPath.cpp Show resolved Hide resolved
runtime/compiler/env/j9method.cpp Outdated Show resolved Hide resolved
runtime/compiler/codegen/J9RecognizedMethodsEnum.hpp Outdated Show resolved Hide resolved
runtime/compiler/codegen/J9RecognizedMethodsEnum.hpp Outdated Show resolved Hide resolved
@nbhuiyan
Copy link
Member Author

@jdmpapin Sorry about the delay in getting back to this PR. I have addressed your review comments.

@jdmpapin
Copy link
Contributor

Could you please squash the two commits?

VarHandle operation methods are mostly calls to Unsafe methods,
which under certain circumstances can be folded into simple loads
and stores in UnsafeFastPath as we can determine the object base
and offsets at compile time. In other cases, we can unlock the
fast paths for the Unsafe operations by setting the appropriate
flags for CodeGen to inline the intrinsics if the platform supports
the operations.

Signed-off-by: Nazim Bhuiyan <[email protected]>
@jdmpapin
Copy link
Contributor

Jenkins test sanity all jdk17

@jdmpapin
Copy link
Contributor

All nodes of label ‘ci.role.build&&hw.arch.ppc64le&&sw.os.cent.7’ are offline

Jenkins test sanity plinux jdk17

@pshipton
Copy link
Member

The plinux machine doesn't boot. It will be offline for the foreseeable future. If you want to run a plinux build it will have to be done internally using a personal build. I suppose we should modify "all" to remove plinux. #19518

@jdmpapin
Copy link
Contributor

All other checks have passed

@jdmpapin jdmpapin merged commit d08f3e1 into eclipse-openj9:master May 21, 2024
16 of 18 checks passed
@pshipton
Copy link
Member

Highly likely his change is the cause of #19532. It's causing too many failure in the builds so I'm going to revert it for now until it can be fixed.

Double checking the tests pass without this change in https://openj9-jenkins.osuosl.org/job/Pipeline-Build-Test-Personal/528

@pshipton
Copy link
Member

Reverted via #19535

@pshipton
Copy link
Member

The personal build didn't work too well because of infra issues, but the nightly builds are passing with the change reverted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp:jit project:MH Used to track Method Handles related work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants