539 counters->update_tenuring_threshold(_tenuring_threshold);
540 counters->update_survivor_size_counters();
541 }
542
543 // Do call at minor collections?
544 // Don't check if the size_policy is ready at this
545 // level. Let the size_policy check that internally.
546 if (UseAdaptiveSizePolicy &&
547 UseAdaptiveGenerationSizePolicyAtMinorCollection &&
548 ((gc_cause != GCCause::_java_lang_system_gc) ||
549 UseAdaptiveSizePolicyWithSystemGC)) {
550
551 // Calculate optimial free space amounts
552 assert(young_gen->max_size() >
553 young_gen->from_space()->capacity_in_bytes() +
554 young_gen->to_space()->capacity_in_bytes(),
555 "Sizes of space in young gen are out-of-bounds");
556 size_t max_eden_size = young_gen->max_size() -
557 young_gen->from_space()->capacity_in_bytes() -
558 young_gen->to_space()->capacity_in_bytes();
559 size_policy->compute_generation_free_space(young_gen->used_in_bytes(),
560 young_gen->eden_space()->used_in_bytes(),
561 old_gen->used_in_bytes(),
562 young_gen->eden_space()->capacity_in_bytes(),
563 old_gen->max_gen_size(),
564 max_eden_size,
565 false /* full gc*/,
566 gc_cause,
567 heap->collector_policy());
568
569 }
570 // Resize the young generation at every collection
571 // even if new sizes have not been calculated. This is
572 // to allow resizes that may have been inhibited by the
573 // relative location of the "to" and "from" spaces.
574
575 // Resizing the old gen at minor collects can cause increases
576 // that don't feed back to the generation sizing policy until
577 // a major collection. Don't resize the old gen here.
578
579 heap->resize_young_gen(size_policy->calculated_eden_size_in_bytes(),
|
539 counters->update_tenuring_threshold(_tenuring_threshold);
540 counters->update_survivor_size_counters();
541 }
542
543 // Do call at minor collections?
544 // Don't check if the size_policy is ready at this
545 // level. Let the size_policy check that internally.
546 if (UseAdaptiveSizePolicy &&
547 UseAdaptiveGenerationSizePolicyAtMinorCollection &&
548 ((gc_cause != GCCause::_java_lang_system_gc) ||
549 UseAdaptiveSizePolicyWithSystemGC)) {
550
551 // Calculate optimial free space amounts
552 assert(young_gen->max_size() >
553 young_gen->from_space()->capacity_in_bytes() +
554 young_gen->to_space()->capacity_in_bytes(),
555 "Sizes of space in young gen are out-of-bounds");
556 size_t max_eden_size = young_gen->max_size() -
557 young_gen->from_space()->capacity_in_bytes() -
558 young_gen->to_space()->capacity_in_bytes();
559 size_policy->compute_generations_free_space(young_gen->used_in_bytes(),
560 young_gen->eden_space()->used_in_bytes(),
561 old_gen->used_in_bytes(),
562 young_gen->eden_space()->capacity_in_bytes(),
563 old_gen->max_gen_size(),
564 max_eden_size,
565 false /* full gc*/,
566 gc_cause,
567 heap->collector_policy());
568
569 }
570 // Resize the young generation at every collection
571 // even if new sizes have not been calculated. This is
572 // to allow resizes that may have been inhibited by the
573 // relative location of the "to" and "from" spaces.
574
575 // Resizing the old gen at minor collects can cause increases
576 // that don't feed back to the generation sizing policy until
577 // a major collection. Don't resize the old gen here.
578
579 heap->resize_young_gen(size_policy->calculated_eden_size_in_bytes(),
|