mirror of
https://github.com/openjdk/jdk.git
synced 2026-05-08 20:49:44 +00:00
8371409: Wrong lock ordering between FullGCALot_lock and ThreadsLockThrottle_lock/MethodCompileQueue_lock
Reviewed-by: rehn, pchilanomate
This commit is contained in:
parent
c8b30da7ef
commit
6db1c4f5b9
@ -544,7 +544,7 @@ void Universe::genesis(TRAPS) {
|
||||
// Only modify the global variable inside the mutex.
|
||||
// If we had a race to here, the other dummy_array instances
|
||||
// and their elements just get dropped on the floor, which is fine.
|
||||
MutexLocker ml(THREAD, FullGCALot_lock);
|
||||
MutexLocker ml(THREAD, FullGCALot_lock, Mutex::_no_safepoint_check_flag);
|
||||
if (_fullgc_alot_dummy_array.is_empty()) {
|
||||
_fullgc_alot_dummy_array = OopHandle(vm_global(), dummy_array());
|
||||
}
|
||||
@ -1458,7 +1458,7 @@ uintptr_t Universe::verify_mark_bits() {
|
||||
#ifdef ASSERT
|
||||
// Release dummy object(s) at bottom of heap
|
||||
bool Universe::release_fullgc_alot_dummy() {
|
||||
MutexLocker ml(FullGCALot_lock);
|
||||
MutexLocker ml(FullGCALot_lock, Mutex::_no_safepoint_check_flag);
|
||||
objArrayOop fullgc_alot_dummy_array = (objArrayOop)_fullgc_alot_dummy_array.resolve();
|
||||
if (fullgc_alot_dummy_array != nullptr) {
|
||||
if (_fullgc_alot_dummy_next >= fullgc_alot_dummy_array->length()) {
|
||||
|
||||
@ -244,7 +244,7 @@ void mutex_init() {
|
||||
MUTEX_DEFN(SymbolArena_lock , PaddedMutex , nosafepoint);
|
||||
MUTEX_DEFN(ExceptionCache_lock , PaddedMutex , safepoint);
|
||||
#ifndef PRODUCT
|
||||
MUTEX_DEFN(FullGCALot_lock , PaddedMutex , safepoint); // a lock to make FullGCALot MT safe
|
||||
MUTEX_DEFN(FullGCALot_lock , PaddedMutex , nosafepoint); // a lock to make FullGCALot MT safe
|
||||
#endif
|
||||
MUTEX_DEFN(BeforeExit_lock , PaddedMonitor, safepoint);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user