-
Notifications
You must be signed in to change notification settings - Fork 706
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
The session/scope fixes on the downcall handler in multithreading #15749
The session/scope fixes on the downcall handler in multithreading #15749
Conversation
The fixes include the following changes with a little polished code in modification to resolve the session/scope specific The following failing jtreg tests in JDK17/18/19 passed with this PR and no other issue was detected: |
Reviewer: @tajila |
b506b82
to
5caee06
Compare
@tajila, any comment on this PR? |
@@ -43,6 +43,7 @@ public class DowncallLinker { | |||
* @return a method handle bound to the native method | |||
*/ | |||
public static MethodHandle getBoundMethodHandle(MethodType functionMethodType, FunctionDescriptor funcDesc) { | |||
return InternalDowncallHandler.getBoundMethodHandle(functionMethodType, funcDesc); | |||
InternalDowncallHandler internalDowncallHandler = new InternalDowncallHandler(functionMethodType, funcDesc); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can this just be return new InternalDowncallHandler(functionMethodType, funcDesc).getBoundMethodHandle();
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed and updated here plus the same in ProgrammableInvoker.java
as suggested above.
jcl/src/java.base/share/classes/openj9/internal/foreign/abi/InternalDowncallHandler.java
Outdated
Show resolved
Hide resolved
The changes aim to resolve the issues specific to session/scope detected in jtreg tests to ensure the session/scopes are kept alive for the owner thread in the native invocation in the multithreading environment. Signed-off-by: Cheng Jin <jincheng@ca.ibm.com>
5caee06
to
683a3a1
Compare
jenkins test sanity zlinux jdk19 |
The changes aim to resolve the issues specific to session/scope
detected in jtreg tests to ensure the session/scopes are kept
alive for the owner thread in the native invocation in the
multithreading environment.
Signed-off-by: Cheng Jin jincheng@ca.ibm.com