251 // OopStorage-based JNI may lock the alloc_locks while releasing a handle, |
251 // OopStorage-based JNI may lock the alloc_locks while releasing a handle, |
252 // while previous JNI didn't need a lock for handle release. This runs afoul |
252 // while previous JNI didn't need a lock for handle release. This runs afoul |
253 // of some places which hold other locks while releasing a handle, including |
253 // of some places which hold other locks while releasing a handle, including |
254 // the Patching_lock, which is of "special" rank. As a temporary workaround, |
254 // the Patching_lock, which is of "special" rank. As a temporary workaround, |
255 // lower the JNI oopstorage lock ranks to make them super-special. |
255 // lower the JNI oopstorage lock ranks to make them super-special. |
256 def(JNIGlobalAlloc_lock , PaddedMutex , special-1, true, Monitor::_safepoint_check_never); |
256 def(JNIGlobalAlloc_lock , PaddedMutex , nonleaf, true, Monitor::_safepoint_check_never); |
257 def(JNIGlobalActive_lock , PaddedMutex , special-2, true, Monitor::_safepoint_check_never); |
257 def(JNIGlobalActive_lock , PaddedMutex , nonleaf-1, true, Monitor::_safepoint_check_never); |
258 def(JNIWeakAlloc_lock , PaddedMutex , special-1, true, Monitor::_safepoint_check_never); |
258 def(JNIWeakAlloc_lock , PaddedMutex , nonleaf, true, Monitor::_safepoint_check_never); |
259 def(JNIWeakActive_lock , PaddedMutex , special-2, true, Monitor::_safepoint_check_never); |
259 def(JNIWeakActive_lock , PaddedMutex , nonleaf-1, true, Monitor::_safepoint_check_never); |
260 def(JNICritical_lock , PaddedMonitor, nonleaf, true, Monitor::_safepoint_check_always); // used for JNI critical regions |
260 def(JNICritical_lock , PaddedMonitor, nonleaf, true, Monitor::_safepoint_check_always); // used for JNI critical regions |
261 def(AdapterHandlerLibrary_lock , PaddedMutex , nonleaf, true, Monitor::_safepoint_check_always); |
261 def(AdapterHandlerLibrary_lock , PaddedMutex , nonleaf, true, Monitor::_safepoint_check_always); |
262 |
262 |
263 def(Heap_lock , PaddedMonitor, nonleaf+1, false, Monitor::_safepoint_check_sometimes); |
263 def(Heap_lock , PaddedMonitor, nonleaf+1, false, Monitor::_safepoint_check_sometimes); |
264 def(JfieldIdCreation_lock , PaddedMutex , nonleaf+1, true, Monitor::_safepoint_check_always); // jfieldID, Used in VM_Operation |
264 def(JfieldIdCreation_lock , PaddedMutex , nonleaf+1, true, Monitor::_safepoint_check_always); // jfieldID, Used in VM_Operation |