Mercurial > hg > truffle
diff src/share/vm/gc_implementation/g1/heapRegion.cpp @ 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 | 0fa27f37d4d4 |
children | 0654ee04b214 063382f9b575 |
line wrap: on
line diff
--- a/src/share/vm/gc_implementation/g1/heapRegion.cpp Tue Mar 29 22:36:16 2011 -0400 +++ b/src/share/vm/gc_implementation/g1/heapRegion.cpp Wed Mar 30 10:26:59 2011 -0400 @@ -360,6 +360,7 @@ set_young_index_in_cset(-1); uninstall_surv_rate_group(); set_young_type(NotYoung); + reset_pre_dummy_top(); if (!par) { // If this is parallel, this will be done later. @@ -923,11 +924,11 @@ ContiguousSpace::set_saved_mark(); OrderAccess::storestore(); _gc_time_stamp = curr_gc_time_stamp; - // The following fence is to force a flush of the writes above, but - // is strictly not needed because when an allocating worker thread - // calls set_saved_mark() it does so under the ParGCRareEvent_lock; - // when the lock is released, the write will be flushed. - // OrderAccess::fence(); + // No need to do another barrier to flush the writes above. If + // this is called in parallel with other threads trying to + // allocate into the region, the caller should call this while + // holding a lock and when the lock is released the writes will be + // flushed. } }