--- old/src/share/vm/gc/g1/heapRegion.cpp 2017-04-25 16:44:44.055174877 +0200 +++ new/src/share/vm/gc/g1/heapRegion.cpp 2017-04-25 16:44:43.907174883 +0200 @@ -51,7 +51,7 @@ HeapRegionDCTOC::HeapRegionDCTOC(G1CollectedHeap* g1, HeapRegion* hr, G1ParPushHeapRSClosure* cl, - CardTableModRefBS::PrecisionStyle precision) : + CardTable::PrecisionStyle precision) : DirtyCardToOopClosure(hr, cl, precision, NULL), _hr(hr), _rs_scan(cl), _g1(g1) { } @@ -148,7 +148,7 @@ guarantee((size_t) 1 << LogOfHRGrainWords == GrainWords, "sanity"); guarantee(CardsPerRegion == 0, "we should only set it once"); - CardsPerRegion = GrainBytes >> CardTableModRefBS::card_shift; + CardsPerRegion = GrainBytes >> G1CardTable::card_shift; if (G1HeapRegionSize != GrainBytes) { FLAG_SET_ERGO(size_t, G1HeapRegionSize, GrainBytes); @@ -195,9 +195,8 @@ assert(capacity() == HeapRegion::GrainBytes, "should be back to normal"); HeapRegionRemSet* hrrs = rem_set(); hrrs->clear(); - CardTableModRefBS* ct_bs = - barrier_set_cast(G1CollectedHeap::heap()->barrier_set()); - ct_bs->clear(MemRegion(bottom(), end())); + G1CardTable* ct = G1CollectedHeap::heap()->g1_card_table(); + ct->clear(MemRegion(bottom(), end())); } void HeapRegion::calc_gc_efficiency() { @@ -618,7 +617,7 @@ class G1VerificationClosure : public OopClosure { protected: G1CollectedHeap* _g1h; - CardTableModRefBS* _bs; + G1CardTable *_ct; oop _containing_obj; bool _failures; int _n_failures; @@ -628,7 +627,7 @@ // _vo == UseNextMarking -> use "next" marking information, // _vo == UseMarkWord -> use mark word from object header. G1VerificationClosure(G1CollectedHeap* g1h, VerifyOption vo) : - _g1h(g1h), _bs(barrier_set_cast(g1h->barrier_set())), + _g1h(g1h), _ct(g1h->g1_card_table()), _containing_obj(NULL), _failures(false), _n_failures(0), _vo(vo) { } @@ -729,9 +728,9 @@ if (from != NULL && to != NULL && from != to && !to->is_pinned()) { - jbyte cv_obj = *_bs->byte_for_const(_containing_obj); - jbyte cv_field = *_bs->byte_for_const(p); - const jbyte dirty = CardTableModRefBS::dirty_card_val(); + jbyte cv_obj = *_ct->byte_for_const(_containing_obj); + jbyte cv_field = *_ct->byte_for_const(p); + const jbyte dirty = G1CardTable::dirty_card_val(); bool is_bad = !(from->is_young() || to->rem_set()->contains_reference(p) @@ -1079,4 +1078,3 @@ set_saved_mark_word(NULL); reset_bot(); } -