1028 gclog_or_tty->print_cr("Recent GC Times (ms):");
1029 _recent_gc_times_ms->dump();
1030 gclog_or_tty->print_cr("(End Time=%3.3f) Recent GC End Times (s):", end_time_sec);
1031 _recent_prev_end_times_for_all_gcs_sec->dump();
1032 gclog_or_tty->print_cr("GC = %3.3f, Interval = %3.3f, Ratio = %3.3f",
1033 _recent_gc_times_ms->sum(), interval_ms, recent_avg_pause_time_ratio());
1034 // In debug mode, terminate the JVM if the user wants to debug at this point.
1035 assert(!G1FailOnFPError, "Debugging data for CR 6898948 has been dumped above");
1036 #endif // !PRODUCT
1037 // Clip ratio between 0.0 and 1.0, and continue. This will be fixed in
1038 // CR 6902692 by redoing the manner in which the ratio is incrementally computed.
1039 if (_recent_avg_pause_time_ratio < 0.0) {
1040 _recent_avg_pause_time_ratio = 0.0;
1041 } else {
1042 assert(_recent_avg_pause_time_ratio - 1.0 > 0.0, "Ctl-point invariant");
1043 _recent_avg_pause_time_ratio = 1.0;
1044 }
1045 }
1046 }
1047
1048 bool new_in_marking_window = _in_marking_window;
1049 bool new_in_marking_window_im = false;
1050 if (during_initial_mark_pause()) {
1051 new_in_marking_window = true;
1052 new_in_marking_window_im = true;
1053 }
1054
1055 if (_last_young_gc) {
1056 // This is supposed to to be the "last young GC" before we start
1057 // doing mixed GCs. Here we decide whether to start mixed GCs or not.
1058
1059 if (!last_pause_included_initial_mark) {
1060 if (next_gc_should_be_mixed("start mixed GCs",
1061 "do not start mixed GCs")) {
1062 set_gcs_are_young(false);
1063 }
1064 } else {
1065 ergo_verbose0(ErgoMixedGCs,
1066 "do not start mixed GCs",
1067 ergo_format_reason("concurrent cycle is about to start"));
1068 }
1069 _last_young_gc = false;
1070 }
1071
1072 if (!_last_gc_was_young) {
1073 // This is a mixed GC. Here we decide whether to continue doing
1074 // mixed GCs or not.
1162 phase_times()->non_young_free_cset_time_ms();
1163
1164 _non_young_other_cost_per_region_ms_seq->add(non_young_other_time_ms /
1165 (double) old_cset_region_length());
1166 }
1167
1168 double constant_other_time_ms = all_other_time_ms -
1169 (young_other_time_ms + non_young_other_time_ms);
1170 _constant_other_time_ms_seq->add(constant_other_time_ms);
1171
1172 double survival_ratio = 0.0;
1173 if (_collection_set_bytes_used_before > 0) {
1174 survival_ratio = (double) _bytes_copied_during_gc /
1175 (double) _collection_set_bytes_used_before;
1176 }
1177
1178 _pending_cards_seq->add((double) _pending_cards);
1179 _rs_lengths_seq->add((double) _max_rs_lengths);
1180 }
1181
1182 _in_marking_window = new_in_marking_window;
1183 _in_marking_window_im = new_in_marking_window_im;
1184 _free_regions_at_end_of_collection = _g1->free_regions();
1185 update_young_list_target_length();
1186
1187 // Note that _mmu_tracker->max_gc_time() returns the time in seconds.
1188 double update_rs_time_goal_ms = _mmu_tracker->max_gc_time() * MILLIUNITS * G1RSetUpdatingPauseTimePercent / 100.0;
1189 adjust_concurrent_refinement(phase_times()->average_last_update_rs_time(),
1190 phase_times()->sum_last_update_rs_processed_buffers(), update_rs_time_goal_ms);
1191
1192 _collectionSetChooser->verify();
1193 }
1194
1195 #define EXT_SIZE_FORMAT "%.1f%s"
1196 #define EXT_SIZE_PARAMS(bytes) \
1197 byte_size_in_proper_unit((double)(bytes)), \
1198 proper_unit_for_byte_size((bytes))
1199
1200 void G1CollectorPolicy::record_heap_size_info_at_start(bool full) {
1201 YoungList* young_list = _g1->young_list();
1202 _eden_used_bytes_before_gc = young_list->eden_used_bytes();
1203 _survivor_used_bytes_before_gc = young_list->survivor_used_bytes();
|
1028 gclog_or_tty->print_cr("Recent GC Times (ms):");
1029 _recent_gc_times_ms->dump();
1030 gclog_or_tty->print_cr("(End Time=%3.3f) Recent GC End Times (s):", end_time_sec);
1031 _recent_prev_end_times_for_all_gcs_sec->dump();
1032 gclog_or_tty->print_cr("GC = %3.3f, Interval = %3.3f, Ratio = %3.3f",
1033 _recent_gc_times_ms->sum(), interval_ms, recent_avg_pause_time_ratio());
1034 // In debug mode, terminate the JVM if the user wants to debug at this point.
1035 assert(!G1FailOnFPError, "Debugging data for CR 6898948 has been dumped above");
1036 #endif // !PRODUCT
1037 // Clip ratio between 0.0 and 1.0, and continue. This will be fixed in
1038 // CR 6902692 by redoing the manner in which the ratio is incrementally computed.
1039 if (_recent_avg_pause_time_ratio < 0.0) {
1040 _recent_avg_pause_time_ratio = 0.0;
1041 } else {
1042 assert(_recent_avg_pause_time_ratio - 1.0 > 0.0, "Ctl-point invariant");
1043 _recent_avg_pause_time_ratio = 1.0;
1044 }
1045 }
1046 }
1047
1048 if (_last_young_gc) {
1049 // This is supposed to to be the "last young GC" before we start
1050 // doing mixed GCs. Here we decide whether to start mixed GCs or not.
1051
1052 if (!last_pause_included_initial_mark) {
1053 if (next_gc_should_be_mixed("start mixed GCs",
1054 "do not start mixed GCs")) {
1055 set_gcs_are_young(false);
1056 }
1057 } else {
1058 ergo_verbose0(ErgoMixedGCs,
1059 "do not start mixed GCs",
1060 ergo_format_reason("concurrent cycle is about to start"));
1061 }
1062 _last_young_gc = false;
1063 }
1064
1065 if (!_last_gc_was_young) {
1066 // This is a mixed GC. Here we decide whether to continue doing
1067 // mixed GCs or not.
1155 phase_times()->non_young_free_cset_time_ms();
1156
1157 _non_young_other_cost_per_region_ms_seq->add(non_young_other_time_ms /
1158 (double) old_cset_region_length());
1159 }
1160
1161 double constant_other_time_ms = all_other_time_ms -
1162 (young_other_time_ms + non_young_other_time_ms);
1163 _constant_other_time_ms_seq->add(constant_other_time_ms);
1164
1165 double survival_ratio = 0.0;
1166 if (_collection_set_bytes_used_before > 0) {
1167 survival_ratio = (double) _bytes_copied_during_gc /
1168 (double) _collection_set_bytes_used_before;
1169 }
1170
1171 _pending_cards_seq->add((double) _pending_cards);
1172 _rs_lengths_seq->add((double) _max_rs_lengths);
1173 }
1174
1175 _in_marking_window_im = false;
1176 if (last_pause_included_initial_mark) {
1177 _in_marking_window = true;
1178 _in_marking_window_im = true;
1179 }
1180
1181 _free_regions_at_end_of_collection = _g1->free_regions();
1182 update_young_list_target_length();
1183
1184 // Note that _mmu_tracker->max_gc_time() returns the time in seconds.
1185 double update_rs_time_goal_ms = _mmu_tracker->max_gc_time() * MILLIUNITS * G1RSetUpdatingPauseTimePercent / 100.0;
1186 adjust_concurrent_refinement(phase_times()->average_last_update_rs_time(),
1187 phase_times()->sum_last_update_rs_processed_buffers(), update_rs_time_goal_ms);
1188
1189 _collectionSetChooser->verify();
1190 }
1191
1192 #define EXT_SIZE_FORMAT "%.1f%s"
1193 #define EXT_SIZE_PARAMS(bytes) \
1194 byte_size_in_proper_unit((double)(bytes)), \
1195 proper_unit_for_byte_size((bytes))
1196
1197 void G1CollectorPolicy::record_heap_size_info_at_start(bool full) {
1198 YoungList* young_list = _g1->young_list();
1199 _eden_used_bytes_before_gc = young_list->eden_used_bytes();
1200 _survivor_used_bytes_before_gc = young_list->survivor_used_bytes();
|