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

Insert branch around re performing store for awrtbar #17517

Merged

Conversation

r30shah
Copy link
Contributor

@r30shah r30shah commented Jun 2, 2023

In case of balanced GC policy, we generated code for awrtbar where in case of Non-NULL object stored into array object, it will re performing storing to avoid branching around which may have been cheaper. This re performing storing in the same object field twice for awrtbarrier somehow causing issue in unit test for PingPong using virtual threads where we end up with incorrect state in the array of ForkJoinTask causing one of the producer or consumer thread to be in waiting state. Change in this commit inserts the branch around the second store where we would jump to in case on runtime we encounter the null object store which can bypass costly write barrier checks.

Fixes: #17255

@r30shah
Copy link
Contributor Author

r30shah commented Jun 2, 2023

@joransiu can I get your review on this change?

@r30shah
Copy link
Contributor Author

r30shah commented Jun 2, 2023

Verified this change with internal builds : view/OpenJ9 - Personal/job/Pipeline-Build-Test-Personal/16811/ and /build_info.php?build_id=52239

@r30shah r30shah force-pushed the fixAwrtbarrierStoreForBalanced branch from 1820134 to 5bf5582 Compare June 2, 2023 19:14
@r30shah r30shah force-pushed the fixAwrtbarrierStoreForBalanced branch from 5bf5582 to 29daff8 Compare June 2, 2023 19:20
In case of balanced GC policy, we generated code for awrtbar where in
case of Non-NULL object stored into array object, it will re performing
storing to avoid branching around which may have been cheaper. This re
performing storing in the same object field twice for awrtbarrier
somehow causing issue in unit test for PingPong using virtual threads
where we end up with incorrect state in the array of ForkJoinTask
causing one of the producer or consumer thread to be in waiting state.
Change in this commit inserts the branch around the second store where
we would jump to in case on runtime we encounter the null object store
which can bypass costly write barrier checks.

Fixes: eclipse-openj9#17255

Signed-off-by: Rahil Shah <rahil@ca.ibm.com>
@r30shah r30shah force-pushed the fixAwrtbarrierStoreForBalanced branch from 29daff8 to c41ff85 Compare June 2, 2023 19:22
@joransiu
Copy link
Member

joransiu commented Jun 2, 2023

Jenkins test sanity zlinux jdk17

@joransiu joransiu merged commit b9cd65e into eclipse-openj9:master Jun 3, 2023
5 checks passed
@pshipton
Copy link
Member

pshipton commented Jun 5, 2023

Pls cherry pick this for the 0.39 branch and create a PR.

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

Successfully merging this pull request may close these issues.

OpenJDK java/lang/Thread/virtual/stress/PingPong timeout
3 participants