mirror of
https://github.com/openjdk/jdk.git
synced 2026-02-09 09:58:43 +00:00
8151336: Root region scanning should be cancelled and disabled when the ConcurrentMarkThread::run_service() exits
Reviewed-by: pliden, tschatzl
This commit is contained in:
parent
88b04ef2ea
commit
242546248e
@ -115,7 +115,6 @@ void ConcurrentMarkThread::run_service() {
|
||||
// wait until started is set.
|
||||
sleepBeforeNextCycle();
|
||||
if (should_terminate()) {
|
||||
_cm->root_regions()->cancel_scan();
|
||||
break;
|
||||
}
|
||||
|
||||
@ -282,6 +281,7 @@ void ConcurrentMarkThread::run_service() {
|
||||
g1h->register_concurrent_cycle_end();
|
||||
}
|
||||
}
|
||||
_cm->root_regions()->cancel_scan();
|
||||
}
|
||||
|
||||
void ConcurrentMarkThread::stop_service() {
|
||||
|
||||
@ -3222,10 +3222,13 @@ G1CollectedHeap::do_collection_pause_at_safepoint(double target_pause_time_ms) {
|
||||
_verifier->verify_region_sets_optional();
|
||||
_verifier->verify_dirty_young_regions();
|
||||
|
||||
// This call will decide whether this pause is an initial-mark
|
||||
// pause. If it is, during_initial_mark_pause() will return true
|
||||
// for the duration of this pause.
|
||||
g1_policy()->decide_on_conc_mark_initiation();
|
||||
// We should not be doing initial mark unless the conc mark thread is running
|
||||
if (!_cmThread->should_terminate()) {
|
||||
// This call will decide whether this pause is an initial-mark
|
||||
// pause. If it is, during_initial_mark_pause() will return true
|
||||
// for the duration of this pause.
|
||||
g1_policy()->decide_on_conc_mark_initiation();
|
||||
}
|
||||
|
||||
// We do not allow initial-mark to be piggy-backed on a mixed GC.
|
||||
assert(!collector_state()->during_initial_mark_pause() ||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user