Skip to content

Commit

Permalink
Merge pull request #11767 from babsingh/disable_vhguards
Browse files Browse the repository at this point in the history
Disable VAR_HANDLE_GUARDS optimization in OpenJ9
  • Loading branch information
gacholio committed Jan 27, 2021
2 parents 091d2c3 + 828c277 commit 914eae4
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions runtime/vm/vmprops.c
Original file line number Diff line number Diff line change
Expand Up @@ -959,6 +959,15 @@ initializeSystemProperties(J9JavaVM * vm)
goto fail;
}

#if defined(J9VM_OPT_OPENJDK_METHODHANDLE)
if (j2seVersion >= J2SE_V11) {
rc = addSystemProperty(vm, "java.lang.invoke.VarHandle.VAR_HANDLE_GUARDS", "false", J9SYSPROP_FLAG_WRITEABLE);
if (J9SYSPROP_ERROR_NONE != rc) {
goto fail;
}
}
#endif /* defined(J9VM_OPT_OPENJDK_METHODHANDLE) */

/* If we get here all is good */
rc = J9SYSPROP_ERROR_NONE;

Expand Down

0 comments on commit 914eae4

Please sign in to comment.