RFR: 8272788: Nonleaf ranked locks should not be safepoint_check_never [v2]

Coleen Phillimore coleenp at openjdk.java.net
Mon Aug 23 20:09:31 UTC 2021


On Mon, 23 Aug 2021 12:27:39 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:

>> Coleen Phillimore has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Remove JfrSream_lock and rerun JFR tests.
>
> src/hotspot/share/prims/jvmtiTagMap.cpp line 75:
> 
>> 73: JvmtiTagMap::JvmtiTagMap(JvmtiEnv* env) :
>> 74:   _env(env),
>> 75:   _lock(Mutex::leaf, "JvmtiTagMap_lock", Mutex::_allow_vm_block_flag,
> 
> David, note this lock.  Since it allows the VM to block, then making it non-leaf is meaningless, since allowing the VM to block means that once you take this lock, you may NOT take another lock that blocks for safepoint.

Let me add more detail here.  This code only takes out the oopstorage ranked lock while this lock is held. I don't know why I made it nonleaf+1. Our testing covers this code really well with the jvmti and jdi tests, which are run in the tiered testing.

-------------

PR: https://git.openjdk.java.net/jdk/pull/5203


More information about the serviceability-dev mailing list