mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-25 13:54:38 +02:00
8042570: Excessive number of tests timing out on nightly testing due to fix for 8040798
Remove unnecessary lock in CompileBroker::mark_on_stack() that causes the deadlock Reviewed-by: kvn, dcubed
This commit is contained in:
parent
9d479b16de
commit
3073f25b0d
1 changed files with 4 additions and 3 deletions
|
@ -1062,15 +1062,16 @@ void CompileBroker::init_compiler_threads(int c1_compiler_count, int c2_compiler
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the methods on the stack as on_stack so that redefine classes doesn't
|
* Set the methods on the stack as on_stack so that redefine classes doesn't
|
||||||
* reclaim them
|
* reclaim them. This method is executed at a safepoint.
|
||||||
*/
|
*/
|
||||||
void CompileBroker::mark_on_stack() {
|
void CompileBroker::mark_on_stack() {
|
||||||
|
assert(SafepointSynchronize::is_at_safepoint(), "sanity check");
|
||||||
|
// Since we are at a safepoint, we do not need a lock to access
|
||||||
|
// the compile queues.
|
||||||
if (_c2_compile_queue != NULL) {
|
if (_c2_compile_queue != NULL) {
|
||||||
MutexLocker locker(_c2_compile_queue->lock());
|
|
||||||
_c2_compile_queue->mark_on_stack();
|
_c2_compile_queue->mark_on_stack();
|
||||||
}
|
}
|
||||||
if (_c1_compile_queue != NULL) {
|
if (_c1_compile_queue != NULL) {
|
||||||
MutexLocker locker(_c1_compile_queue->lock());
|
|
||||||
_c1_compile_queue->mark_on_stack();
|
_c1_compile_queue->mark_on_stack();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue