< prev index next >
src/share/vm/gc/g1/g1ConcurrentMark.cpp
Print this page
*** 370,399 ****
assert(res == NULL || res->is_survivor(), "post-condition");
return res;
}
! void G1CMRootRegions::cancel_scan() {
MutexLockerEx x(RootRegionScan_lock, Mutex::_no_safepoint_check_flag);
_scan_in_progress = false;
RootRegionScan_lock->notify_all();
}
void G1CMRootRegions::scan_finished() {
assert(scan_in_progress(), "pre-condition");
// Currently, only survivors can be root regions.
if (!_should_abort) {
assert(_next_survivor == NULL, "we should have claimed all survivors");
}
_next_survivor = NULL;
! {
! MutexLockerEx x(RootRegionScan_lock, Mutex::_no_safepoint_check_flag);
! _scan_in_progress = false;
! RootRegionScan_lock->notify_all();
! }
}
bool G1CMRootRegions::wait_until_scan_finished() {
if (!scan_in_progress()) return false;
--- 370,399 ----
assert(res == NULL || res->is_survivor(), "post-condition");
return res;
}
! void G1CMRootRegions::notify_scan_done() {
MutexLockerEx x(RootRegionScan_lock, Mutex::_no_safepoint_check_flag);
_scan_in_progress = false;
RootRegionScan_lock->notify_all();
}
+ void G1CMRootRegions::cancel_scan() {
+ notify_scan_done();
+ }
+
void G1CMRootRegions::scan_finished() {
assert(scan_in_progress(), "pre-condition");
// Currently, only survivors can be root regions.
if (!_should_abort) {
assert(_next_survivor == NULL, "we should have claimed all survivors");
}
_next_survivor = NULL;
! notify_scan_done();
}
bool G1CMRootRegions::wait_until_scan_finished() {
if (!scan_in_progress()) return false;
< prev index next >