Skip to content

Commit

Permalink
Enforce lightweight locking on 32-bit platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
rkennke committed Sep 25, 2024
1 parent 2c4a787 commit cd69da8
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/hotspot/share/runtime/arguments.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1820,6 +1820,15 @@ bool Arguments::check_vm_args_consistency() {
}
#endif

#ifndef _LP64
if (LockingMode != LM_LIGHTWEIGHT) {
FLAG_SET_CMDLINE(LockingMode, LM_LIGHTWEIGHT);
// Self-forwarding in bit 3 of the mark-word conflicts
// with 4-byte-aligned stack-locks.
warning("Legacy locking not supported on this platform");
}
#endif

if (UseObjectMonitorTable && LockingMode != LM_LIGHTWEIGHT) {
// ObjectMonitorTable requires lightweight locking.
FLAG_SET_CMDLINE(UseObjectMonitorTable, false);
Expand Down

0 comments on commit cd69da8

Please sign in to comment.