-
Notifications
You must be signed in to change notification settings - Fork 722
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
[FFI/JDK22] Performance improvement via NativeMH/LinkToNative #18799
[FFI/JDK22] Performance improvement via NativeMH/LinkToNative #18799
Conversation
The prototype includes the changes in OpenJ9 (this PR) and in OpenJDK at ibmruntimes/openj9-openjdk-jdk#736 & ibmruntimes/openj9-openjdk-jdk22#17, in which case they should be merged altogether once approved. |
1397732
to
f0b26e2
Compare
Reviewer: @tajila |
runtime/vm/OutOfLineINL_openj9_internal_foreign_abi_InternalDowncallHandler.cpp
Outdated
Show resolved
Hide resolved
jcl/src/java.base/share/classes/openj9/internal/foreign/abi/InternalDowncallHandler.java
Show resolved
Hide resolved
jcl/src/java.base/share/classes/openj9/internal/foreign/abi/InternalDowncallHandler.java
Outdated
Show resolved
Hide resolved
6acc2b9
to
71e2d90
Compare
runtime/vm/OutOfLineINL_openj9_internal_foreign_abi_InternalDowncallHandler.cpp
Outdated
Show resolved
Hide resolved
runtime/vm/OutOfLineINL_openj9_internal_foreign_abi_InternalDowncallHandler.cpp
Outdated
Show resolved
Hide resolved
runtime/vm/OutOfLineINL_openj9_internal_foreign_abi_InternalUpcallHandler.cpp
Outdated
Show resolved
Hide resolved
0f45817
to
f2a3b9a
Compare
runtime/vm/OutOfLineINL_openj9_internal_foreign_abi_InternalDowncallHandler.cpp
Outdated
Show resolved
Hide resolved
Could this improvement be extended to jdk21? It would be a greater benefit given jdk21 is an LTS version. |
f2a3b9a
to
21f6135
Compare
There is no plan for the moment to push the optimization (still in the status of prototype/exploration) back to JDK21 (might be a little bit different in terms of the OpenJDK extension) as we have not yet confirmed whether it really works this way as expected given a bunch of work/issues with the prototype will be addressed by JIT. FYI: @tajila |
runtime/vm/OutOfLineINL_openj9_internal_foreign_abi_InternalDowncallHandler.cpp
Outdated
Show resolved
Hide resolved
runtime/vm/OutOfLineINL_openj9_internal_foreign_abi_InternalUpcallHandler.cpp
Outdated
Show resolved
Hide resolved
dd2158d
to
1863d90
Compare
runtime/vm/OutOfLineINL_openj9_internal_foreign_abi_InternalDowncallHandler.cpp
Outdated
Show resolved
Hide resolved
fcc0249
to
20aeec7
Compare
runtime/vm/OutOfLineINL_openj9_internal_foreign_abi_InternalDowncallHandler.cpp
Outdated
Show resolved
Hide resolved
20aeec7
to
ec6f98c
Compare
Jenkins test sanity amac,zlinux,win jdknext depends ibmruntimes/openj9-openjdk-jdk#736 |
jcl/src/java.base/share/classes/openj9/internal/foreign/abi/InternalDowncallHandler.java
Outdated
Show resolved
Hide resolved
jcl/src/java.base/share/classes/openj9/internal/foreign/abi/InternalDowncallHandler.java
Outdated
Show resolved
Hide resolved
runtime/vm/OutOfLineINL_openj9_internal_foreign_abi_InternalDowncallHandler.cpp
Outdated
Show resolved
Hide resolved
76dd44b
to
b6687f6
Compare
runtime/vm/OutOfLineINL_openj9_internal_foreign_abi_InternalDowncallHandler.cpp
Outdated
Show resolved
Hide resolved
b6687f6
to
9fc62be
Compare
jcl/src/java.base/share/classes/openj9/internal/foreign/abi/InternalDowncallHandler.java
Outdated
Show resolved
Hide resolved
jcl/src/java.base/share/classes/openj9/internal/foreign/abi/InternalDowncallHandler.java
Outdated
Show resolved
Hide resolved
runtime/vm/OutOfLineINL_openj9_internal_foreign_abi_InternalDowncallHandler.cpp
Show resolved
Hide resolved
9fc62be
to
2dd0653
Compare
runtime/vm/OutOfLineINL_openj9_internal_foreign_abi_InternalDowncallHandler.cpp
Show resolved
Hide resolved
runtime/vm/OutOfLineINL_openj9_internal_foreign_abi_InternalDowncallHandler.cpp
Outdated
Show resolved
Hide resolved
The prototype explores the way of shrinking the performance gap in downcall by leveraging the NativeMH/LinkToNative mechanism in OpenJDK to guarantee that the LambdaForm-customized bytecode can be optimized in JIT. Note: 1) the prototype only supports primitives for the moment. 2) -Xffiproto is used to enable the prototype without the constraints on the life cycle of memory segment. Signed-off-by: ChengJin01 <[email protected]>
2dd0653
to
dc2f404
Compare
@tajila, any further comments? |
The prototype explores the way of shrinking the performance gap
in downcall by leveraging the
NativeMH/LinkToNative
mechanismin OpenJDK to guarantee that the LambdaForm-customized
bytecode can be optimized in JIT.
Note:
constraints on the life cycle of memory segment.
Signed-off-by: ChengJin01 [email protected]