< prev index next >

src/hotspot/share/gc/shenandoah/shenandoahYoungGeneration.cpp

Print this page

 13  * accompanied this code).
 14  *
 15  * You should have received a copy of the GNU General Public License version
 16  * 2 along with this work; if not, write to the Free Software Foundation,
 17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 18  *
 19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 20  * or visit www.oracle.com if you need additional information or have any
 21  * questions.
 22  *
 23  */
 24 
 25 #include "gc/shenandoah/heuristics/shenandoahYoungHeuristics.hpp"
 26 #include "gc/shenandoah/shenandoahAgeCensus.hpp"
 27 #include "gc/shenandoah/shenandoahFreeSet.hpp"
 28 #include "gc/shenandoah/shenandoahHeap.hpp"
 29 #include "gc/shenandoah/shenandoahHeapRegionClosures.hpp"
 30 #include "gc/shenandoah/shenandoahUtils.hpp"
 31 #include "gc/shenandoah/shenandoahYoungGeneration.hpp"
 32 
 33 ShenandoahYoungGeneration::ShenandoahYoungGeneration(uint max_queues, size_t max_capacity, size_t soft_max_capacity) :
 34   ShenandoahGeneration(YOUNG, max_queues, max_capacity, soft_max_capacity),
 35   _old_gen_task_queues(nullptr) {
 36 }
 37 
 38 void ShenandoahYoungGeneration::set_concurrent_mark_in_progress(bool in_progress) {
 39   ShenandoahHeap* heap = ShenandoahHeap::heap();
 40   heap->set_concurrent_young_mark_in_progress(in_progress);
 41   if (is_bootstrap_cycle() && in_progress && !heap->is_prepare_for_old_mark_in_progress()) {
 42     // This is not a bug. When the bootstrapping marking phase is complete,
 43     // the old generation marking is still in progress, unless it's not.
 44     // In the case that old-gen preparation for mixed evacuation has been
 45     // preempted, we do not want to set concurrent old mark to be in progress.
 46     heap->set_concurrent_old_mark_in_progress(in_progress);
 47   }
 48 }
 49 
 50 bool ShenandoahYoungGeneration::contains(ShenandoahAffiliation affiliation) const {
 51   return affiliation == YOUNG_GENERATION;
 52 }
 53 
 54 bool ShenandoahYoungGeneration::contains(ShenandoahHeapRegion* region) const {

 13  * accompanied this code).
 14  *
 15  * You should have received a copy of the GNU General Public License version
 16  * 2 along with this work; if not, write to the Free Software Foundation,
 17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 18  *
 19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 20  * or visit www.oracle.com if you need additional information or have any
 21  * questions.
 22  *
 23  */
 24 
 25 #include "gc/shenandoah/heuristics/shenandoahYoungHeuristics.hpp"
 26 #include "gc/shenandoah/shenandoahAgeCensus.hpp"
 27 #include "gc/shenandoah/shenandoahFreeSet.hpp"
 28 #include "gc/shenandoah/shenandoahHeap.hpp"
 29 #include "gc/shenandoah/shenandoahHeapRegionClosures.hpp"
 30 #include "gc/shenandoah/shenandoahUtils.hpp"
 31 #include "gc/shenandoah/shenandoahYoungGeneration.hpp"
 32 
 33 ShenandoahYoungGeneration::ShenandoahYoungGeneration(uint max_queues, size_t max_capacity) :
 34   ShenandoahGeneration(YOUNG, max_queues, max_capacity),
 35   _old_gen_task_queues(nullptr) {
 36 }
 37 
 38 void ShenandoahYoungGeneration::set_concurrent_mark_in_progress(bool in_progress) {
 39   ShenandoahHeap* heap = ShenandoahHeap::heap();
 40   heap->set_concurrent_young_mark_in_progress(in_progress);
 41   if (is_bootstrap_cycle() && in_progress && !heap->is_prepare_for_old_mark_in_progress()) {
 42     // This is not a bug. When the bootstrapping marking phase is complete,
 43     // the old generation marking is still in progress, unless it's not.
 44     // In the case that old-gen preparation for mixed evacuation has been
 45     // preempted, we do not want to set concurrent old mark to be in progress.
 46     heap->set_concurrent_old_mark_in_progress(in_progress);
 47   }
 48 }
 49 
 50 bool ShenandoahYoungGeneration::contains(ShenandoahAffiliation affiliation) const {
 51   return affiliation == YOUNG_GENERATION;
 52 }
 53 
 54 bool ShenandoahYoungGeneration::contains(ShenandoahHeapRegion* region) const {
< prev index next >