8184732: Deadlock detection improvements for 'special' locks

Assert that special ranked locks cannot safepoint and allow_vm_block and remove locks from the exceptional lock list in no_safepoint_verifier.

Reviewed-by: dholmes, eosterlund
This commit is contained in:
Coleen Phillimore 2019-09-30 13:10:11 -04:00
parent 8a50aa7d21
commit 98f454c9ca
7 changed files with 116 additions and 22 deletions

View file

@ -1101,7 +1101,7 @@ Klass* InstanceKlass::implementor() const {
void InstanceKlass::set_implementor(Klass* k) {
assert_lock_strong(Compile_lock);
assert_locked_or_safepoint(Compile_lock);
assert(is_interface(), "not interface");
Klass* volatile* addr = adr_implementor();
assert(addr != NULL, "null addr");
@ -2333,8 +2333,8 @@ void InstanceKlass::remove_unshareable_info() {
// being added to class hierarchy (see SystemDictionary:::add_to_hierarchy()).
_init_state = allocated;
{
MutexLocker ml(Compile_lock);
{ // Otherwise this needs to take out the Compile_lock.
assert(SafepointSynchronize::is_at_safepoint(), "only called at safepoint");
init_implementor();
}