@@ -880,7 +880,7 @@ static Klass* resolve_field_return_klass(const methodHandle& caller, int bci, TR
880880// movl reg, [reg1 + <const>] (for field offsets)
881881// jmp continue
882882// <being_init offset> <bytes to copy> <bytes to skip>
883- // patch_stub: jmp Runtim1 ::patch_code (through a runtime stub)
883+ // patch_stub: jmp Runtime1 ::patch_code (through a runtime stub)
884884// jmp patch_site
885885//
886886// If the class is being initialized the patch body is rewritten and
@@ -1096,7 +1096,7 @@ JRT_ENTRY(void, Runtime1::patch_code(JavaThread* current, Runtime1::StubID stub_
10961096 // Now copy code back
10971097
10981098 {
1099- MutexLocker ml_patch (current, Patching_lock , Mutex::_no_safepoint_check_flag);
1099+ MutexLocker ml_code (current, CodeCache_lock , Mutex::_no_safepoint_check_flag);
11001100 //
11011101 // Deoptimization may have happened while we waited for the lock.
11021102 // In that case we don't bother to do any patching we just return
@@ -1261,12 +1261,8 @@ JRT_ENTRY(void, Runtime1::patch_code(JavaThread* current, Runtime1::StubID stub_
12611261 }
12621262 }
12631263 }
1264- }
1265-
1266- // If we are patching in a non-perm oop, make sure the nmethod
1267- // is on the right list.
1268- {
1269- MutexLocker ml_code (current, CodeCache_lock, Mutex::_no_safepoint_check_flag);
1264+ // If we are patching in a non-perm oop, make sure the nmethod
1265+ // is on the right list.
12701266 nmethod* nm = CodeCache::find_nmethod (caller_frame.pc ());
12711267 guarantee (nm != nullptr , " only nmethods can contain non-perm oops" );
12721268
0 commit comments