mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-21 19:44:41 +02:00
8077710: BACKOUT - java hangs with -XX:ParallelGCThreads=0 -XX:+ExplicitGCInvokesConcurrent options
Removed unnecessary guards. Reviewed-by: stefank, jwilhelm
This commit is contained in:
parent
8e2f1d5560
commit
7d99c72512
1 changed files with 6 additions and 8 deletions
|
@ -93,21 +93,19 @@ void G1RootProcessor::worker_has_discovered_all_strong_classes() {
|
||||||
uint n_workers = _g1h->n_par_threads();
|
uint n_workers = _g1h->n_par_threads();
|
||||||
assert(ClassUnloadingWithConcurrentMark, "Currently only needed when doing G1 Class Unloading");
|
assert(ClassUnloadingWithConcurrentMark, "Currently only needed when doing G1 Class Unloading");
|
||||||
|
|
||||||
if (n_workers > 0) {
|
|
||||||
uint new_value = (uint)Atomic::add(1, &_n_workers_discovered_strong_classes);
|
uint new_value = (uint)Atomic::add(1, &_n_workers_discovered_strong_classes);
|
||||||
if (new_value == n_workers) {
|
if (new_value == n_workers) {
|
||||||
// This thread is last. Notify the others.
|
// This thread is last. Notify the others.
|
||||||
MonitorLockerEx ml(&_lock, Mutex::_no_safepoint_check_flag);
|
MonitorLockerEx ml(&_lock, Mutex::_no_safepoint_check_flag);
|
||||||
_lock.notify_all();
|
_lock.notify_all();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void G1RootProcessor::wait_until_all_strong_classes_discovered() {
|
void G1RootProcessor::wait_until_all_strong_classes_discovered() {
|
||||||
uint n_workers = _g1h->n_par_threads();
|
uint n_workers = _g1h->n_par_threads();
|
||||||
assert(ClassUnloadingWithConcurrentMark, "Currently only needed when doing G1 Class Unloading");
|
assert(ClassUnloadingWithConcurrentMark, "Currently only needed when doing G1 Class Unloading");
|
||||||
|
|
||||||
if (n_workers > 0 && (uint)_n_workers_discovered_strong_classes != n_workers) {
|
if ((uint)_n_workers_discovered_strong_classes != n_workers) {
|
||||||
MonitorLockerEx ml(&_lock, Mutex::_no_safepoint_check_flag);
|
MonitorLockerEx ml(&_lock, Mutex::_no_safepoint_check_flag);
|
||||||
while ((uint)_n_workers_discovered_strong_classes != n_workers) {
|
while ((uint)_n_workers_discovered_strong_classes != n_workers) {
|
||||||
_lock.wait(Mutex::_no_safepoint_check_flag, 0, false);
|
_lock.wait(Mutex::_no_safepoint_check_flag, 0, false);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue