src/share/vm/gc_implementation/g1/concurrentMark.cpp
Print this page
rev 3985 : 7132678: G1: verify that the marking bitmaps have no marks for objects over TAMS
Summary: Verify that parts of the marking bitmaps that should not have marks do not have marks, i.e., the parts of the bitmap that cover [TAMS:top) areas for each heap region.
Reviewed-by:
*** 1258,1267 ****
--- 1258,1268 ----
gclog_or_tty->print(" VerifyDuringGC:(before)");
Universe::heap()->prepare_for_verify();
Universe::verify(/* silent */ false,
/* option */ VerifyOption_G1UsePrevMarking);
}
+ g1h->check_bitmaps("Remark Start");
G1CollectorPolicy* g1p = g1h->g1_policy();
g1p->record_concurrent_mark_remark_start();
double start = os::elapsedTime();
*** 1298,1307 ****
--- 1299,1309 ----
gclog_or_tty->print(" VerifyDuringGC:(after)");
Universe::heap()->prepare_for_verify();
Universe::verify(/* silent */ false,
/* option */ VerifyOption_G1UseNextMarking);
}
+ g1h->check_bitmaps("Remark End");
assert(!restart_for_overflow(), "sanity");
// Completely reset the marking state since marking completed
set_non_marking_state();
}
*** 1952,1961 ****
--- 1954,1964 ----
gclog_or_tty->print(" VerifyDuringGC:(before)");
Universe::heap()->prepare_for_verify();
Universe::verify(/* silent */ false,
/* option */ VerifyOption_G1UsePrevMarking);
}
+ g1h->check_bitmaps("Cleanup Start");
G1CollectorPolicy* g1p = G1CollectedHeap::heap()->g1_policy();
g1p->record_concurrent_mark_cleanup_start();
double start = os::elapsedTime();
*** 2107,2116 ****
--- 2110,2120 ----
gclog_or_tty->print(" VerifyDuringGC:(after)");
Universe::heap()->prepare_for_verify();
Universe::verify(/* silent */ false,
/* option */ VerifyOption_G1UsePrevMarking);
}
+ g1h->check_bitmaps("Cleanup End");
g1h->verify_region_sets_optional();
}
void ConcurrentMark::completeCleanup() {
*** 3180,3189 ****
--- 3184,3198 ----
// abandon current marking iteration due to a Full GC
void ConcurrentMark::abort() {
// Clear all marks to force marking thread to do nothing
_nextMarkBitMap->clearAll();
+
+ // Note we cannot clear the previous marking bitmap here
+ // since VerifyDuringGC verifies the objects marked during
+ // a full GC against the previous bitmap.
+
// Clear the liveness counting data
clear_all_count_data();
// Empty mark stack
reset_marking_state();
for (uint i = 0; i < _max_worker_id; ++i) {