< prev index next >

src/hotspot/share/gc/g1/g1DefaultPolicy.cpp

Print this page
rev 47446 : [mq]: 8184667-cleanup-g1concurrentmark
rev 47449 : imported patch 8189666
rev 47451 : imported patch 8189729-perc-naming
rev 47452 : [mq]: 8189729-erikd-review

*** 1002,1012 **** _analytics->append_prev_collection_pause_end_ms(elapsed_time_ms); record_pause(Cleanup, _mark_cleanup_start_sec, end_sec); } ! double G1DefaultPolicy::reclaimable_bytes_perc(size_t reclaimable_bytes) const { return percent_of(reclaimable_bytes, _g1->capacity()); } void G1DefaultPolicy::maybe_start_marking() { if (need_to_start_conc_mark("end of GC")) { --- 1002,1012 ---- _analytics->append_prev_collection_pause_end_ms(elapsed_time_ms); record_pause(Cleanup, _mark_cleanup_start_sec, end_sec); } ! double G1DefaultPolicy::reclaimable_bytes_percent(size_t reclaimable_bytes) const { return percent_of(reclaimable_bytes, _g1->capacity()); } void G1DefaultPolicy::maybe_start_marking() { if (need_to_start_conc_mark("end of GC")) {
*** 1077,1095 **** return false; } // Is the amount of uncollected reclaimable space above G1HeapWastePercent? size_t reclaimable_bytes = cset_chooser()->remaining_reclaimable_bytes(); ! double reclaimable_perc = reclaimable_bytes_perc(reclaimable_bytes); double threshold = (double) G1HeapWastePercent; ! if (reclaimable_perc <= threshold) { log_debug(gc, ergo)("%s (reclaimable percentage not over threshold). candidate old regions: %u reclaimable: " SIZE_FORMAT " (%1.2f) threshold: " UINTX_FORMAT, ! false_action_str, cset_chooser()->remaining_regions(), reclaimable_bytes, reclaimable_perc, G1HeapWastePercent); return false; } log_debug(gc, ergo)("%s (candidate old regions available). candidate old regions: %u reclaimable: " SIZE_FORMAT " (%1.2f) threshold: " UINTX_FORMAT, ! true_action_str, cset_chooser()->remaining_regions(), reclaimable_bytes, reclaimable_perc, G1HeapWastePercent); return true; } uint G1DefaultPolicy::calc_min_old_cset_length() const { // The min old CSet region bound is based on the maximum desired --- 1077,1095 ---- return false; } // Is the amount of uncollected reclaimable space above G1HeapWastePercent? size_t reclaimable_bytes = cset_chooser()->remaining_reclaimable_bytes(); ! double reclaimable_percent = reclaimable_bytes_percent(reclaimable_bytes); double threshold = (double) G1HeapWastePercent; ! if (reclaimable_percent <= threshold) { log_debug(gc, ergo)("%s (reclaimable percentage not over threshold). candidate old regions: %u reclaimable: " SIZE_FORMAT " (%1.2f) threshold: " UINTX_FORMAT, ! false_action_str, cset_chooser()->remaining_regions(), reclaimable_bytes, reclaimable_percent, G1HeapWastePercent); return false; } log_debug(gc, ergo)("%s (candidate old regions available). candidate old regions: %u reclaimable: " SIZE_FORMAT " (%1.2f) threshold: " UINTX_FORMAT, ! true_action_str, cset_chooser()->remaining_regions(), reclaimable_bytes, reclaimable_percent, G1HeapWastePercent); return true; } uint G1DefaultPolicy::calc_min_old_cset_length() const { // The min old CSet region bound is based on the maximum desired
< prev index next >