If a Mutex has safepoint_check_never, that should imply that the vm thread or gc threads can also block on it, ie. _allow_vm_block. This also makes these locks imply a NoSafepointVerifier once taken. Having locks that don't block for safepoint but can safepoint while holding the lock should be a configuration that we should disallow for simplicity.
ie. if you can't safepoint while taking the lock, why allow safepoints while holding the lock?
The allow_vm_block matrix looks like this:
_allow_vm_block=true, _safepoint_check_always - after safepoint check and lock acquired NSV
_allow_vm_block=true, _safepoint_check_never - after lock acquired NSV
_allow_vm_block=false, _safepoint_check_always - after safepoint check and lock acquired, other safepoints ok
_allow_vm_block=false, _safepoint_check_never - after lock acquired, safepoints are allowed (don't allow this!)
ie. if you can't safepoint while taking the lock, why allow safepoints while holding the lock?
The allow_vm_block matrix looks like this:
_allow_vm_block=true, _safepoint_check_always - after safepoint check and lock acquired NSV
_allow_vm_block=true, _safepoint_check_never - after lock acquired NSV
_allow_vm_block=false, _safepoint_check_always - after safepoint check and lock acquired, other safepoints ok
_allow_vm_block=false, _safepoint_check_never - after lock acquired, safepoints are allowed (don't allow this!)