comparison src/share/vm/memory/cardTableModRefBS.hpp @ 2433:abdfc822206f

7023069: G1: Introduce symmetric locking in the slow allocation path 7023151: G1: refactor the code that operates on _cur_alloc_region to be re-used for allocs by the GC threads 7018286: G1: humongous allocation attempts should take the GC locker into account Summary: First, this change replaces the asymmetric locking scheme in the G1 slow alloc path by a summetric one. Second, it factors out the code that operates on _cur_alloc_region so that it can be re-used for allocations by the GC threads in the future. Reviewed-by: stefank, brutisso, johnc
author tonyp
date Wed, 30 Mar 2011 10:26:59 -0400
parents f95d63e2154a
children c69b1043dfb1
comparison
equal deleted inserted replaced
2432:455328d90876 2433:abdfc822206f
380 bool is_card_aligned(HeapWord* p) { 380 bool is_card_aligned(HeapWord* p) {
381 jbyte* pcard = byte_for(p); 381 jbyte* pcard = byte_for(p);
382 return (addr_for(pcard) == p); 382 return (addr_for(pcard) == p);
383 } 383 }
384 384
385 HeapWord* align_to_card_boundary(HeapWord* p) {
386 jbyte* pcard = byte_for(p + card_size_in_words - 1);
387 return addr_for(pcard);
388 }
389
385 // The kinds of precision a CardTableModRefBS may offer. 390 // The kinds of precision a CardTableModRefBS may offer.
386 enum PrecisionStyle { 391 enum PrecisionStyle {
387 Precise, 392 Precise,
388 ObjHeadPreciseArray 393 ObjHeadPreciseArray
389 }; 394 };