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

Replace Thread.onSpinWait() with a YIELD instruction on AArch64 #20545

Merged
merged 1 commit into from
Nov 13, 2024

Conversation

knn-k
Copy link
Contributor

@knn-k knn-k commented Nov 8, 2024

Enabled by default.
Disable by setting the TR_noYieldOnSpinWait environment variable.

Enabled by default.
Disable by setting the TR_noYieldOnSpinWait environment variable.

Signed-off-by: KONNO Kazuhiro <[email protected]>
@knn-k knn-k added comp:jit depends:omr Pull request is dependent on a corresponding change in OMR arch:aarch64 labels Nov 8, 2024
@knn-k
Copy link
Contributor Author

knn-k commented Nov 8, 2024

@knn-k
Copy link
Contributor Author

knn-k commented Nov 8, 2024

Jenkins test sanity alinux64,amac jdk17 depends eclipse-omr/omr#7537

@knn-k knn-k marked this pull request as ready for review November 9, 2024 00:00
@knn-k knn-k requested a review from 0xdaryl November 9, 2024 14:24
@knn-k
Copy link
Contributor Author

knn-k commented Nov 10, 2024

The yield instruction is generated as follows:

------------------------------
 n14n     (  0)  treetop                                                                              [    0xff06703a6580] bci=[-1,7,4] rc=0 vc=97 vn=- li=3 udi=- nc=1
 n13n     (  0)    call  java/lang/Thread.onSpinWait()V[#345  native static Method] [flags 0x500 0x0 ]  [    0xff06703a6530] bci=[-1,7,4] rc=0 vc=97 vn=- li=3 udi=- nc=0
------------------------------

 [    0xff067047b290]	7 	yield

@0xdaryl 0xdaryl self-assigned this Nov 13, 2024
@0xdaryl 0xdaryl merged commit 34e3574 into eclipse-openj9:master Nov 13, 2024
9 checks passed
@knn-k knn-k deleted the aarch64onSpinWait branch November 13, 2024 14:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arch:aarch64 comp:jit depends:omr Pull request is dependent on a corresponding change in OMR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants