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

Support for Scoped Values (JEP 429) #16678

Merged
merged 1 commit into from
Feb 14, 2023

Conversation

babsingh
Copy link
Contributor

@babsingh babsingh commented Feb 7, 2023

In JDK20, extentLocalCache is renamed to scopedValueCache.

JDK19 and JDK20 changes are completely segregated to avoid
cross-contamination if the implementation differs a lot across
JDK versions.

TODO: Thread.findScopedValueBindings needs to be implemented.
This is tracked in #16677.

Related: #16439
Fixes: #16657

Signed-off-by: Babneet Singh [email protected]

@babsingh babsingh force-pushed the fix_vthread_jvmti_suspend branch 3 times, most recently from 40d4d00 to 26112a8 Compare February 7, 2023 18:59
@babsingh
Copy link
Contributor Author

babsingh commented Feb 7, 2023

This PR contains changes related to the code, which fixed the failures reported in ibmruntimes/openj9-openjdk-jdk#531 (comment).

Started a personal build to verify this PR (JDK19 + JDK20, sanity.functional + sanity.openjdk): https://hyc-runtimes-jenkins.swg-devops.com/view/OpenJ9%20-%20Personal/job/Pipeline-Build-Test-Personal/15472/.

fyi @ChengJin01 @JasonFengJ9 @tajila @pshipton

@babsingh babsingh marked this pull request as ready for review February 9, 2023 02:52
@babsingh
Copy link
Contributor Author

babsingh commented Feb 9, 2023

In the above personal build, WithScopedValue passes and all other OpenJDK test failures (#16655, #16656) are known. This PR is ready to be reviewed. @JasonFengJ9 Requesting your review.

jcl/src/java.base/share/classes/java/lang/Access.java Outdated Show resolved Hide resolved
jcl/src/java.base/share/classes/java/lang/Access.java Outdated Show resolved Hide resolved
runtime/jcl/exports.cmake Show resolved Hide resolved
runtime/jcl/common/thread.cpp Outdated Show resolved Hide resolved
runtime/jcl/module.xml Show resolved Hide resolved
@babsingh babsingh force-pushed the fix_vthread_jvmti_suspend branch 4 times, most recently from 8f8ef18 to a96ff1e Compare February 9, 2023 16:35
@babsingh
Copy link
Contributor Author

babsingh commented Feb 9, 2023

@JasonFengJ9 Addressed all your feedback. Removed Access.java changes since it is already correct.

Copy link
Member

@JasonFengJ9 JasonFengJ9 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@JasonFengJ9
Copy link
Member

@keithc-ca please review/merge.

runtime/jcl/uma/se19only_exports.xml Outdated Show resolved Hide resolved
runtime/jcl/common/thread.cpp Outdated Show resolved Hide resolved
runtime/jcl/exports.cmake Outdated Show resolved Hide resolved
runtime/jcl/module.xml Outdated Show resolved Hide resolved
runtime/jcl/uma/se20_exports.xml Outdated Show resolved Hide resolved
@keithc-ca
Copy link
Contributor

Given the short life-expectancy of Java 19, perhaps it makes sense to just use the new name scopedValueCache in the Java 19 implementations? That might reduce the work to be done later should we decide to remove things specific to Java 19.

@babsingh
Copy link
Contributor Author

@keithc-ca Addressed all your feedback.

In JDK20, extentLocalCache is renamed to scopedValueCache.

JDK19 and JDK20 changes are completely segregated to avoid
cross-contamination if the implementation differs a lot across
JDK versions.

TODO: Thread.findScopedValueBindings needs to be implemented.
This is tracked in eclipse-openj9#16677.

Fixes: eclipse-openj9#16657

Signed-off-by: Babneet Singh <[email protected]>
@keithc-ca
Copy link
Contributor

Jenkins test sanity alinux64 jdk19,jdk20

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

jdk20 OpenJDK jdk/internal/misc/ThreadFlock/WithScopedValue UnsatisfiedLinkError Thread.scopedValueCache
3 participants