-
Notifications
You must be signed in to change notification settings - Fork 728
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
[JDK20] Thread.findScopedValueBindings to support JEP 429? #16677
Comments
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]>
Pseudo-code implementation:
|
@gacholio FYI |
Currently we don't have a test to validate the implementation. Maybe we should put an assertion in the implementation so we will know when this is actually called. |
@0xdaryl The three
Issue: JIT inlining will prevent us to find the first argument during the stack walk since the O-slots don't retain their order when the methods are inlined. #17402 contains the current implementation of the behaviour described in #16677 (comment). |
For the record, you can't reliably retrieve the first argument for any compiled method, inlined or not. |
In this case, we can look at all the arguments of the |
Related: eclipse-openj9/openj9#17402 eclipse-openj9/openj9#16677 Co-authored-by: Babneet Singh <[email protected]> Signed-off-by: Gengchen Tuo <[email protected]>
Related: eclipse-openj9/openj9#17402 eclipse-openj9/openj9#16677 Co-authored-by: Babneet Singh <[email protected]> Signed-off-by: Gengchen Tuo <[email protected]>
Related: eclipse-openj9/openj9#17402 eclipse-openj9/openj9#16677 Co-authored-by: Babneet Singh <[email protected]> Signed-off-by: Gengchen Tuo <[email protected]>
Walk the stack frames to look for the runWith() method and get its first argument, which should be an instance of java.lang.ScopedValue$Snapshot. Closes: eclipse-openj9#16677 Closes: eclipse-openj9#17402 Co-authored-by: Gengchen Tuo [email protected] Signed-off-by: Babneet Singh [email protected]
Walk the stack frames to look for the runWith() method and get its first argument, which should be an instance of java.lang.ScopedValue$Snapshot. Closes: eclipse-openj9#16677 Closes: eclipse-openj9#17402 Co-authored-by: Gengchen Tuo [email protected] Signed-off-by: Babneet Singh [email protected]
For
Thread.findScopedValueBindings
,The text was updated successfully, but these errors were encountered: