584
585 double G1Policy::average_time_ms(G1GCPhaseTimes::GCParPhases phase) const {
586 return phase_times()->average_time_ms(phase);
587 }
588
589 double G1Policy::young_other_time_ms() const {
590 return phase_times()->young_cset_choice_time_ms() +
591 phase_times()->average_time_ms(G1GCPhaseTimes::YoungFreeCSet);
592 }
593
594 double G1Policy::non_young_other_time_ms() const {
595 return phase_times()->non_young_cset_choice_time_ms() +
596 phase_times()->average_time_ms(G1GCPhaseTimes::NonYoungFreeCSet);
597 }
598
599 double G1Policy::other_time_ms(double pause_time_ms) const {
600 return pause_time_ms - phase_times()->cur_collection_par_time_ms();
601 }
602
603 double G1Policy::constant_other_time_ms(double pause_time_ms) const {
604 return other_time_ms(pause_time_ms) - phase_times()->total_free_cset_time_ms();
605 }
606
607 bool G1Policy::about_to_start_mixed_phase() const {
608 return _g1h->concurrent_mark()->cm_thread()->during_cycle() || collector_state()->in_young_gc_before_mixed();
609 }
610
611 bool G1Policy::need_to_start_conc_mark(const char* source, size_t alloc_word_size) {
612 if (about_to_start_mixed_phase()) {
613 return false;
614 }
615
616 size_t marking_initiating_used_threshold = _ihop_control->get_conc_mark_start_threshold();
617
618 size_t cur_used_bytes = _g1h->non_young_capacity_bytes();
619 size_t alloc_byte_size = alloc_word_size * HeapWordSize;
620 size_t marking_request_bytes = cur_used_bytes + alloc_byte_size;
621
622 bool result = false;
623 if (marking_request_bytes > marking_initiating_used_threshold) {
624 result = collector_state()->in_young_only_phase() && !collector_state()->in_young_gc_before_mixed();
|
584
585 double G1Policy::average_time_ms(G1GCPhaseTimes::GCParPhases phase) const {
586 return phase_times()->average_time_ms(phase);
587 }
588
589 double G1Policy::young_other_time_ms() const {
590 return phase_times()->young_cset_choice_time_ms() +
591 phase_times()->average_time_ms(G1GCPhaseTimes::YoungFreeCSet);
592 }
593
594 double G1Policy::non_young_other_time_ms() const {
595 return phase_times()->non_young_cset_choice_time_ms() +
596 phase_times()->average_time_ms(G1GCPhaseTimes::NonYoungFreeCSet);
597 }
598
599 double G1Policy::other_time_ms(double pause_time_ms) const {
600 return pause_time_ms - phase_times()->cur_collection_par_time_ms();
601 }
602
603 double G1Policy::constant_other_time_ms(double pause_time_ms) const {
604 return other_time_ms(pause_time_ms) - phase_times()->total_free_cset_time_ms() - phase_times()->total_rebuild_freelist_time_ms();
605 }
606
607 bool G1Policy::about_to_start_mixed_phase() const {
608 return _g1h->concurrent_mark()->cm_thread()->during_cycle() || collector_state()->in_young_gc_before_mixed();
609 }
610
611 bool G1Policy::need_to_start_conc_mark(const char* source, size_t alloc_word_size) {
612 if (about_to_start_mixed_phase()) {
613 return false;
614 }
615
616 size_t marking_initiating_used_threshold = _ihop_control->get_conc_mark_start_threshold();
617
618 size_t cur_used_bytes = _g1h->non_young_capacity_bytes();
619 size_t alloc_byte_size = alloc_word_size * HeapWordSize;
620 size_t marking_request_bytes = cur_used_bytes + alloc_byte_size;
621
622 bool result = false;
623 if (marking_request_bytes > marking_initiating_used_threshold) {
624 result = collector_state()->in_young_only_phase() && !collector_state()->in_young_gc_before_mixed();
|