mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
8047290: Make Mutex::_no_safepoint_check_flag locks verify that this lock never checks for safepoint
Ensure consistent safepoint checking in Mutex/Monitor locking methods. Reviewed-by: dholmes, dcubed, coleenp
This commit is contained in:
parent
bb30bd7e0a
commit
1d76295d70
32 changed files with 447 additions and 134 deletions
|
@ -400,7 +400,8 @@ void GCTaskManager::initialize() {
|
|||
assert(workers() != 0, "no workers");
|
||||
_monitor = new Monitor(Mutex::barrier, // rank
|
||||
"GCTaskManager monitor", // name
|
||||
Mutex::_allow_vm_block_flag); // allow_vm_block
|
||||
Mutex::_allow_vm_block_flag, // allow_vm_block
|
||||
Monitor::_safepoint_check_never);
|
||||
// The queue for the GCTaskManager must be a CHeapObj.
|
||||
GCTaskQueue* unsynchronized_queue = GCTaskQueue::create_on_c_heap();
|
||||
_queue = SynchronizedGCTaskQueue::create(unsynchronized_queue, lock());
|
||||
|
@ -1125,7 +1126,8 @@ Monitor* MonitorSupply::reserve() {
|
|||
} else {
|
||||
result = new Monitor(Mutex::barrier, // rank
|
||||
"MonitorSupply monitor", // name
|
||||
Mutex::_allow_vm_block_flag); // allow_vm_block
|
||||
Mutex::_allow_vm_block_flag, // allow_vm_block
|
||||
Monitor::_safepoint_check_never);
|
||||
}
|
||||
guarantee(result != NULL, "shouldn't return NULL");
|
||||
assert(!result->is_locked(), "shouldn't be locked");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue