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

Update ScopedMemoryAccess_closeScope0 for JDK22 #19167

Merged
merged 1 commit into from
Mar 18, 2024

Conversation

babsingh
Copy link
Contributor

In JDK22, the definition has changed to

native void
closeScope0(MemorySessionImpl session, ScopedAccessError error);

The return type has changed from boolean to void, and a
second parameter is re-introduced: ScopedAccessError error.

Previously, closeScope0 would be retried until it returned true,
which suggested that the scope/session was not found on any thread's
stack.

The new behaviour sets an asynchronous exception for all threads,
which have the scope/session on their stack. The second parameter,
error, is the asynchronous exception, which is thrown. Before
throwing the error, the thread verifies if the scope/session is
still on the stack. If not, the asynchronous exception is cleared
and not thrown.

Related: #13211 (comment)

@babsingh
Copy link
Contributor Author

@gacholio Can you please review these changes?

fyi @ChengJin01 @tajila

@babsingh babsingh requested a review from gacholio March 18, 2024 14:31
@gacholio
Copy link
Contributor

You've added object fields to the J9VMThread, so they must be added to:

https://github.com/gacholio/openj9/blob/master/runtime/gc_structs/VMThreadSlotIterator.cpp

@babsingh babsingh force-pushed the main6 branch 2 times, most recently from d0b693e to 7da9809 Compare March 18, 2024 15:13
In JDK22, the definition has changed to

native void
closeScope0(MemorySessionImpl session, ScopedAccessError error);

The return type has changed from boolean to void, and a second
parameter is re-introduced: "ScopedAccessError error".

Previously, closeScope0 would be retried until it returned true,
which suggested that the scope/session was not found on any thread's
stack.

The new behaviour sets an asynchronous exception for all threads,
which have the scope/session on their stack. The second parameter,
error, is the asynchronous exception, which is thrown. Before
throwing the error, the thread verifies if the scope/session is
still on the stack. If not, the asynchronous exception is cleared
and not thrown.

Related: eclipse-openj9#13211 (comment)

Signed-off-by: Babneet Singh <sbabneet@ca.ibm.com>
@gacholio
Copy link
Contributor

jenkins test sanity zlinux jdk21

@gacholio
Copy link
Contributor

jenkins test sanity,sanity.openjdk alinux jdk22

@gacholio
Copy link
Contributor

No actual failures in the JDK21 tests.

@gacholio gacholio merged commit cffd236 into eclipse-openj9:master Mar 18, 2024
7 of 8 checks passed
babsingh added a commit to babsingh/aqa-tests that referenced this pull request May 2, 2024
TestHandshake has been fixed by

- eclipse-openj9/openj9#19167
- eclipse-openj9/openj9#19412

Signed-off-by: Babneet Singh <sbabneet@ca.ibm.com>
babsingh added a commit to babsingh/aqa-tests that referenced this pull request May 2, 2024
TestHandshake has been fixed by

- eclipse-openj9/openj9#19167
- eclipse-openj9/openj9#19412

Related: eclipse-openj9/openj9#13211

Signed-off-by: Babneet Singh <sbabneet@ca.ibm.com>
babsingh added a commit to babsingh/aqa-tests that referenced this pull request May 2, 2024
TestHandshake has been fixed by

- eclipse-openj9/openj9#19167
- eclipse-openj9/openj9#19412

Related: eclipse-openj9/openj9#13211

Signed-off-by: Babneet Singh <sbabneet@ca.ibm.com>
pshipton pushed a commit to adoptium/aqa-tests that referenced this pull request May 2, 2024
TestHandshake has been fixed by

- eclipse-openj9/openj9#19167
- eclipse-openj9/openj9#19412

Related: eclipse-openj9/openj9#13211

Signed-off-by: Babneet Singh <sbabneet@ca.ibm.com>
babsingh added a commit to babsingh/aqa-tests that referenced this pull request May 2, 2024
TestHandshake has been fixed by

- eclipse-openj9/openj9#19167
- eclipse-openj9/openj9#19412

Related: eclipse-openj9/openj9#13211

Signed-off-by: Babneet Singh <sbabneet@ca.ibm.com>
pshipton pushed a commit to adoptium/aqa-tests that referenced this pull request May 3, 2024
TestHandshake has been fixed by

- eclipse-openj9/openj9#19167
- eclipse-openj9/openj9#19412

Related: eclipse-openj9/openj9#13211

Signed-off-by: Babneet Singh <sbabneet@ca.ibm.com>
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.

2 participants