RFR: 8272797: Mutex with rank safepoint_check_never imply allow_vm_block [v5]
David Holmes
dholmes at openjdk.java.net
Thu Aug 26 23:21:28 UTC 2021
On Thu, 26 Aug 2021 15:42:50 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:
>> See CR for details. This essentially makes Mutex that safepoint_check_never imply a NoSafepointVerifier, which is a stronger and simpler invariant.
>> Tested with tier1-6.
>
> Coleen Phillimore has updated the pull request incrementally with one additional commit since the last revision:
>
> Reverse the order of safepoint_check_required and allow_vm_block arguments so that the first can imply the value of the second. This is good because if we decide to rename the second to something like _allow_safepoint_use instead there's less to change. Also remove default arguments as they are evil.
Sorry Coleen but now I'm confused again. You have a bunch of locks that are safepoint_check_always AND _allow_vm_block==true. That doesn't make sense if _allow_vm_block is supposed to be about acquiring the lock in the VMThread (or GC thread) _at_ a safepoint. You seem to be trying to express that non-JavaThreads can acquire a lock at any time if _allow_vm_block is true. But _allow_vm_block should only be checked when at a safepoint, or else when it is the VMThread, otherwise it doesn't have the meaning that enabled you to make this change.
David
-------------
PR: https://git.openjdk.java.net/jdk/pull/5218
More information about the hotspot-dev
mailing list