595 // length. This is the minimum desired young list length according
596 // to the user's inputs.
597 uint calculate_young_list_desired_min_length(uint base_min_length);
598
599 // Calculate and return the maximum desired young list target
600 // length. This is the maximum desired young list length according
601 // to the user's inputs.
602 uint calculate_young_list_desired_max_length();
603
604 // Calculate and return the maximum young list target length that
605 // can fit into the pause time goal. The parameters are: rs_lengths
606 // represent the prediction of how large the young RSet lengths will
607 // be, base_min_length is the already existing number of regions in
608 // the young list, min_length and max_length are the desired min and
609 // max young list length according to the user's inputs.
610 uint calculate_young_list_target_length(size_t rs_lengths,
611 uint base_min_length,
612 uint desired_min_length,
613 uint desired_max_length);
614
615 // Check whether a given young length (young_length) fits into the
616 // given target pause time and whether the prediction for the amount
617 // of objects to be copied for the given length will fit into the
618 // given free space (expressed by base_free_regions). It is used by
619 // calculate_young_list_target_length().
620 bool predict_will_fit(uint young_length, double base_time_ms,
621 uint base_free_regions, double target_pause_time_ms);
622
623 // Calculate the minimum number of old regions we'll add to the CSet
624 // during a mixed GC.
625 uint calc_min_old_cset_length();
626
627 // Calculate the maximum number of old regions we'll add to the CSet
628 // during a mixed GC.
629 uint calc_max_old_cset_length();
630
631 // Returns the given amount of uncollected reclaimable space
632 // as a percentage of the current heap capacity.
633 double reclaimable_bytes_perc(size_t reclaimable_bytes);
634
670
671 bool need_to_start_conc_mark(const char* source, size_t alloc_word_size = 0);
672
673 // Record the start and end of an evacuation pause.
674 void record_collection_pause_start(double start_time_sec);
675 void record_collection_pause_end(double pause_time_ms, EvacuationInfo& evacuation_info);
676
677 // Record the start and end of a full collection.
678 void record_full_collection_start();
679 void record_full_collection_end();
680
681 // Must currently be called while the world is stopped.
682 void record_concurrent_mark_init_end(double mark_init_elapsed_time_ms);
683
684 // Record start and end of remark.
685 void record_concurrent_mark_remark_start();
686 void record_concurrent_mark_remark_end();
687
688 // Record start, end, and completion of cleanup.
689 void record_concurrent_mark_cleanup_start();
690 void record_concurrent_mark_cleanup_end(int no_of_gc_threads);
691 void record_concurrent_mark_cleanup_completed();
692
693 // Records the information about the heap size for reporting in
694 // print_detailed_heap_transition
695 void record_heap_size_info_at_start(bool full);
696
697 // Print heap sizing transition (with less and more detail).
698 void print_heap_transition();
699 void print_detailed_heap_transition(bool full = false);
700
701 void record_stop_world_start();
702 void record_concurrent_pause();
703
704 // Record how much space we copied during a GC. This is typically
705 // called when a GC alloc region is being retired.
706 void record_bytes_copied_during_gc(size_t bytes) {
707 _bytes_copied_during_gc += bytes;
708 }
709
710 // The amount of space we copied during a GC.
|
595 // length. This is the minimum desired young list length according
596 // to the user's inputs.
597 uint calculate_young_list_desired_min_length(uint base_min_length);
598
599 // Calculate and return the maximum desired young list target
600 // length. This is the maximum desired young list length according
601 // to the user's inputs.
602 uint calculate_young_list_desired_max_length();
603
604 // Calculate and return the maximum young list target length that
605 // can fit into the pause time goal. The parameters are: rs_lengths
606 // represent the prediction of how large the young RSet lengths will
607 // be, base_min_length is the already existing number of regions in
608 // the young list, min_length and max_length are the desired min and
609 // max young list length according to the user's inputs.
610 uint calculate_young_list_target_length(size_t rs_lengths,
611 uint base_min_length,
612 uint desired_min_length,
613 uint desired_max_length);
614
615 // Calculate and return chunk size (in number of regions) for parallel
616 // concurrent mark cleanup.
617 uint calculate_parallel_work_chunk_size(int n_workers, uint n_regions);
618
619 // Check whether a given young length (young_length) fits into the
620 // given target pause time and whether the prediction for the amount
621 // of objects to be copied for the given length will fit into the
622 // given free space (expressed by base_free_regions). It is used by
623 // calculate_young_list_target_length().
624 bool predict_will_fit(uint young_length, double base_time_ms,
625 uint base_free_regions, double target_pause_time_ms);
626
627 // Calculate the minimum number of old regions we'll add to the CSet
628 // during a mixed GC.
629 uint calc_min_old_cset_length();
630
631 // Calculate the maximum number of old regions we'll add to the CSet
632 // during a mixed GC.
633 uint calc_max_old_cset_length();
634
635 // Returns the given amount of uncollected reclaimable space
636 // as a percentage of the current heap capacity.
637 double reclaimable_bytes_perc(size_t reclaimable_bytes);
638
674
675 bool need_to_start_conc_mark(const char* source, size_t alloc_word_size = 0);
676
677 // Record the start and end of an evacuation pause.
678 void record_collection_pause_start(double start_time_sec);
679 void record_collection_pause_end(double pause_time_ms, EvacuationInfo& evacuation_info);
680
681 // Record the start and end of a full collection.
682 void record_full_collection_start();
683 void record_full_collection_end();
684
685 // Must currently be called while the world is stopped.
686 void record_concurrent_mark_init_end(double mark_init_elapsed_time_ms);
687
688 // Record start and end of remark.
689 void record_concurrent_mark_remark_start();
690 void record_concurrent_mark_remark_end();
691
692 // Record start, end, and completion of cleanup.
693 void record_concurrent_mark_cleanup_start();
694 void record_concurrent_mark_cleanup_end(int n_workers);
695 void record_concurrent_mark_cleanup_completed();
696
697 // Records the information about the heap size for reporting in
698 // print_detailed_heap_transition
699 void record_heap_size_info_at_start(bool full);
700
701 // Print heap sizing transition (with less and more detail).
702 void print_heap_transition();
703 void print_detailed_heap_transition(bool full = false);
704
705 void record_stop_world_start();
706 void record_concurrent_pause();
707
708 // Record how much space we copied during a GC. This is typically
709 // called when a GC alloc region is being retired.
710 void record_bytes_copied_during_gc(size_t bytes) {
711 _bytes_copied_during_gc += bytes;
712 }
713
714 // The amount of space we copied during a GC.
|