< prev index next >
src/hotspot/share/gc/shared/cardTableRS.cpp
Print this page
*** 277,316 ****
}
void CardTableRS::younger_refs_in_space_iterate(Space* sp,
OopsInGenClosure* cl,
uint n_threads) {
const MemRegion urasm = sp->used_region_at_save_marks();
#ifdef ASSERT
! // Convert the assertion check to a warning if we are running
! // CMS+ParNew until related bug is fixed.
MemRegion ur = sp->used_region();
! assert(ur.contains(urasm) || (UseConcMarkSweepGC),
"Did you forget to call save_marks()? "
"[" PTR_FORMAT ", " PTR_FORMAT ") is not contained in "
"[" PTR_FORMAT ", " PTR_FORMAT ")",
p2i(urasm.start()), p2i(urasm.end()), p2i(ur.start()), p2i(ur.end()));
- // In the case of CMS+ParNew, issue a warning
- if (!ur.contains(urasm)) {
- assert(UseConcMarkSweepGC, "Tautology: see assert above");
- log_warning(gc)("CMS+ParNew: Did you forget to call save_marks()? "
- "[" PTR_FORMAT ", " PTR_FORMAT ") is not contained in "
- "[" PTR_FORMAT ", " PTR_FORMAT ")",
- p2i(urasm.start()), p2i(urasm.end()), p2i(ur.start()), p2i(ur.end()));
- MemRegion ur2 = sp->used_region();
- MemRegion urasm2 = sp->used_region_at_save_marks();
- if (!ur.equals(ur2)) {
- log_warning(gc)("CMS+ParNew: Flickering used_region()!!");
- }
- if (!urasm.equals(urasm2)) {
- log_warning(gc)("CMS+ParNew: Flickering used_region_at_save_marks()!!");
- }
- ShouldNotReachHere();
- }
- #endif
- non_clean_card_iterate_possibly_parallel(sp, urasm, cl, this, n_threads);
}
void CardTableRS::clear_into_younger(Generation* old_gen) {
assert(GenCollectedHeap::heap()->is_old_gen(old_gen),
"Should only be called for the old generation");
// The card tables for the youngest gen need never be cleared.
--- 277,304 ----
}
void CardTableRS::younger_refs_in_space_iterate(Space* sp,
OopsInGenClosure* cl,
uint n_threads) {
+ verify_used_region_at_save_marks(sp);
+
const MemRegion urasm = sp->used_region_at_save_marks();
+ non_clean_card_iterate_possibly_parallel(sp, urasm, cl, this, n_threads);
+ }
+
#ifdef ASSERT
! void CardTableRS::verify_used_region_at_save_marks(Space* sp) const {
MemRegion ur = sp->used_region();
! MemRegion urasm = sp->used_region_at_save_marks();
!
! assert(ur.contains(urasm),
"Did you forget to call save_marks()? "
"[" PTR_FORMAT ", " PTR_FORMAT ") is not contained in "
"[" PTR_FORMAT ", " PTR_FORMAT ")",
p2i(urasm.start()), p2i(urasm.end()), p2i(ur.start()), p2i(ur.end()));
}
+ #endif
void CardTableRS::clear_into_younger(Generation* old_gen) {
assert(GenCollectedHeap::heap()->is_old_gen(old_gen),
"Should only be called for the old generation");
// The card tables for the youngest gen need never be cleared.
*** 609,620 ****
VerifyCTGenClosure blk(this);
GenCollectedHeap::heap()->generation_iterate(&blk, false);
CardTable::verify();
}
! CardTableRS::CardTableRS(MemRegion whole_heap) :
! CardTable(whole_heap, /* scanned concurrently */ UseConcMarkSweepGC && CMSPrecleaningEnabled),
_cur_youngergen_card_val(youngergenP1_card),
// LNC functionality
_lowest_non_clean(NULL),
_lowest_non_clean_chunk_size(NULL),
_lowest_non_clean_base_chunk_index(NULL),
--- 597,608 ----
VerifyCTGenClosure blk(this);
GenCollectedHeap::heap()->generation_iterate(&blk, false);
CardTable::verify();
}
! CardTableRS::CardTableRS(MemRegion whole_heap, bool scanned_concurrently) :
! CardTable(whole_heap, scanned_concurrently),
_cur_youngergen_card_val(youngergenP1_card),
// LNC functionality
_lowest_non_clean(NULL),
_lowest_non_clean_chunk_size(NULL),
_lowest_non_clean_base_chunk_index(NULL),
*** 696,710 ****
CardTableRS* ct,
uint n_threads)
{
if (!mr.is_empty()) {
if (n_threads > 0) {
- #if INCLUDE_ALL_GCS
non_clean_card_iterate_parallel_work(sp, mr, cl, ct, n_threads);
- #else // INCLUDE_ALL_GCS
- fatal("Parallel gc not supported here.");
- #endif // INCLUDE_ALL_GCS
} else {
// clear_cl finds contiguous dirty ranges of cards to process and clear.
// This is the single-threaded version used by DefNew.
const bool parallel = false;
--- 684,694 ----
*** 715,722 ****
--- 699,712 ----
clear_cl.do_MemRegion(mr);
}
}
}
+ void CardTableRS::non_clean_card_iterate_parallel_work(Space* sp, MemRegion mr,
+ OopsInGenClosure* cl, CardTableRS* ct,
+ uint n_threads) {
+ fatal("Parallel gc not supported here.");
+ }
+
bool CardTableRS::is_in_young(oop obj) const {
return GenCollectedHeap::heap()->is_in_young(obj);
}
< prev index next >