248 OopsInGenClosure* cl) { |
248 OopsInGenClosure* cl) { |
249 DirtyCardToOopClosure* dcto_cl = sp->new_dcto_cl(cl, _ct_bs->precision(), |
249 DirtyCardToOopClosure* dcto_cl = sp->new_dcto_cl(cl, _ct_bs->precision(), |
250 cl->gen_boundary()); |
250 cl->gen_boundary()); |
251 ClearNoncleanCardWrapper clear_cl(dcto_cl, this); |
251 ClearNoncleanCardWrapper clear_cl(dcto_cl, this); |
252 |
252 |
253 _ct_bs->non_clean_card_iterate_possibly_parallel(sp, sp->used_region_at_save_marks(), |
253 const MemRegion urasm = sp->used_region_at_save_marks(); |
|
254 #ifdef ASSERT |
|
255 // Convert the assertion check to a warning if we are running |
|
256 // CMS+ParNew until related bug is fixed. |
|
257 MemRegion ur = sp->used_region(); |
|
258 assert(ur.contains(urasm) || (UseConcMarkSweepGC && UseParNewGC), |
|
259 err_msg("Did you forget to call save_marks()? " |
|
260 "[" PTR_FORMAT ", " PTR_FORMAT ") is not contained in " |
|
261 "[" PTR_FORMAT ", " PTR_FORMAT ")", |
|
262 urasm.start(), urasm.end(), ur.start(), ur.end())); |
|
263 // In the case of CMS+ParNew, issue a warning |
|
264 if (!ur.contains(urasm)) { |
|
265 assert(UseConcMarkSweepGC && UseParNewGC, "Tautology: see assert above"); |
|
266 warning("CMS+ParNew: Did you forget to call save_marks()? " |
|
267 "[" PTR_FORMAT ", " PTR_FORMAT ") is not contained in " |
|
268 "[" PTR_FORMAT ", " PTR_FORMAT ")", |
|
269 urasm.start(), urasm.end(), ur.start(), ur.end()); |
|
270 MemRegion ur2 = sp->used_region(); |
|
271 MemRegion urasm2 = sp->used_region_at_save_marks(); |
|
272 if (!ur.equals(ur2)) { |
|
273 warning("CMS+ParNew: Flickering used_region()!!"); |
|
274 } |
|
275 if (!urasm.equals(urasm2)) { |
|
276 warning("CMS+ParNew: Flickering used_region_at_save_marks()!!"); |
|
277 } |
|
278 } |
|
279 #endif |
|
280 _ct_bs->non_clean_card_iterate_possibly_parallel(sp, urasm, |
254 dcto_cl, &clear_cl); |
281 dcto_cl, &clear_cl); |
255 } |
282 } |
256 |
283 |
257 void CardTableRS::clear_into_younger(Generation* gen, bool clear_perm) { |
284 void CardTableRS::clear_into_younger(Generation* gen, bool clear_perm) { |
258 GenCollectedHeap* gch = GenCollectedHeap::heap(); |
285 GenCollectedHeap* gch = GenCollectedHeap::heap(); |