Print this page
G1: Use SoftMaxHeapSize to guide GC heuristics

*** 677,686 **** --- 677,689 ---- (end_time_sec - _analytics->last_known_gc_end_time_sec()) * 1000.0; _analytics->update_recent_gc_times(end_time_sec, pause_time_ms); _analytics->compute_pause_time_ratio(interval_ms, pause_time_ms); } + if (collector_state()->finish_of_mixed_gc()) { + collector_state()->set_finish_of_mixed_gc(false); + } if (collector_state()->in_young_gc_before_mixed()) { assert(!this_pause_included_initial_mark, "The young GC before mixed is not allowed to be an initial mark GC"); // This has been the young GC before we start doing mixed GCs. We already // decided to start mixed GCs much earlier, so there is nothing to do except // advancing the state.
*** 690,699 **** --- 693,703 ---- // This is a mixed GC. Here we decide whether to continue doing more // mixed GCs or not. if (!next_gc_should_be_mixed("continue mixed GCs", "do not continue mixed GCs")) { collector_state()->set_in_young_only_phase(true); + collector_state()->set_finish_of_mixed_gc(true); clear_collection_set_candidates(); maybe_start_marking(); } }
*** 1409,1413 **** --- 1413,1424 ---- // Don't clear the survivor list handles until the start of // the next evacuation pause - we need it in order to re-tag // the survivor regions from this evacuation pause as 'young' // at the start of the next. } + + size_t G1Policy::minimum_desired_bytes_after_concurrent_mark(size_t used_bytes) { + size_t minimum_desired_buffer_size = _ihop_control->predict_unstrained_buffer_size(); + return minimum_desired_buffer_size != 0 ? + minimum_desired_buffer_size : _young_list_max_length * HeapRegion::GrainBytes + + _reserve_regions * HeapRegion::GrainBytes + used_bytes; + }