Skip to content

Update ScopedMemoryAccess_closeScope0 for JDK22 - #19167

Merged
gacholio merged 1 commit into
eclipse-openj9:masterfrom
babsingh:main6
Mar 18, 2024
Merged

Update ScopedMemoryAccess_closeScope0 for JDK22#19167
gacholio merged 1 commit into
eclipse-openj9:masterfrom
babsingh:main6

Conversation

@babsingh

Copy link
Copy Markdown
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
Copy Markdown
Contributor Author

@gacholio Can you please review these changes?

fyi @ChengJin01 @tajila

@babsingh
babsingh requested a review from gacholio March 18, 2024 14:31
Comment thread runtime/jcl/common/jdk_internal_misc_ScopedMemoryAccess.cpp Outdated
@gacholio

Copy link
Copy Markdown
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

Comment thread runtime/oti/VMHelpers.hpp Outdated
@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
Copy Markdown
Contributor

jenkins test sanity zlinux jdk21

@gacholio

Copy link
Copy Markdown
Contributor

jenkins test sanity,sanity.openjdk alinux jdk22

@gacholio

Copy link
Copy Markdown
Contributor

No actual failures in the JDK21 tests.

@gacholio
gacholio merged commit cffd236 into eclipse-openj9:master Mar 18, 2024
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