Mercurial > hg > graal-jvmci-8
comparison src/share/vm/memory/cardTableModRefBS.cpp @ 3357:fc2b798ab316
6883834: ParNew: assert(!_g->to()->is_in_reserved(obj),"Scanning field twice?") with LargeObjects tests
Summary: Fixed process_chunk_boundaries(), used for parallel card scanning when using ParNew/CMS, so as to prevent double-scanning, or worse, non-scanning of imprecisely marked objects exceeding parallel chunk size. Made some sizing parameters for parallel card scanning diagnostic, disabled ParallelGCRetainPLAB, and elaborated and clarified some comments.
Reviewed-by: stefank, johnc
author | ysr |
---|---|
date | Tue, 10 May 2011 00:33:21 -0700 |
parents | 063382f9b575 |
children | bca17e38de00 |
comparison
equal
deleted
inserted
replaced
3325:54a56bbaf95b | 3357:fc2b798ab316 |
---|---|
453 Atomic::cmpxchg(new_val, &_byte_map[card_index], val); | 453 Atomic::cmpxchg(new_val, &_byte_map[card_index], val); |
454 } | 454 } |
455 return true; | 455 return true; |
456 } | 456 } |
457 | 457 |
458 | |
459 void CardTableModRefBS::non_clean_card_iterate_possibly_parallel(Space* sp, | 458 void CardTableModRefBS::non_clean_card_iterate_possibly_parallel(Space* sp, |
460 MemRegion mr, | 459 MemRegion mr, |
461 DirtyCardToOopClosure* dcto_cl, | 460 OopsInGenClosure* cl, |
462 ClearNoncleanCardWrapper* cl) { | 461 CardTableRS* ct) { |
463 if (!mr.is_empty()) { | 462 if (!mr.is_empty()) { |
464 int n_threads = SharedHeap::heap()->n_par_threads(); | 463 int n_threads = SharedHeap::heap()->n_par_threads(); |
465 if (n_threads > 0) { | 464 if (n_threads > 0) { |
466 #ifndef SERIALGC | 465 #ifndef SERIALGC |
467 non_clean_card_iterate_parallel_work(sp, mr, dcto_cl, cl, n_threads); | 466 non_clean_card_iterate_parallel_work(sp, mr, cl, ct, n_threads); |
468 #else // SERIALGC | 467 #else // SERIALGC |
469 fatal("Parallel gc not supported here."); | 468 fatal("Parallel gc not supported here."); |
470 #endif // SERIALGC | 469 #endif // SERIALGC |
471 } else { | 470 } else { |
472 // We do not call the non_clean_card_iterate_serial() version below because | 471 // We do not call the non_clean_card_iterate_serial() version below because |
473 // we want to clear the cards (which non_clean_card_iterate_serial() does not | 472 // we want to clear the cards (which non_clean_card_iterate_serial() does not |
474 // do for us), and the ClearNoncleanCardWrapper closure itself does the work | 473 // do for us): clear_cl here does the work of finding contiguous dirty ranges |
475 // of finding contiguous dirty ranges of cards to process (and clear). | 474 // of cards to process and clear. |
476 cl->do_MemRegion(mr); | 475 |
476 DirtyCardToOopClosure* dcto_cl = sp->new_dcto_cl(cl, precision(), | |
477 cl->gen_boundary()); | |
478 ClearNoncleanCardWrapper clear_cl(dcto_cl, ct); | |
479 | |
480 clear_cl.do_MemRegion(mr); | |
477 } | 481 } |
478 } | 482 } |
479 } | 483 } |
480 | 484 |
481 // The iterator itself is not MT-aware, but | 485 // The iterator itself is not MT-aware, but |