< prev index next >
src/hotspot/share/gc/g1/g1HeapSizingPolicy.cpp
Print this page
rev 59304 : [mq]: 8245087-kim-sjohanss-review
@@ -48,12 +48,12 @@
_ratio_over_threshold_count = 0;
_ratio_over_threshold_sum = 0.0;
_pauses_since_start = 0;
}
-double G1HeapSizingPolicy::scale_with_heap(double pause_time_ratio) {
- double threshold = pause_time_ratio;
+double G1HeapSizingPolicy::scale_with_heap(double pause_time_threshold) {
+ double threshold = pause_time_threshold;
// If the heap is at less than half its maximum size, scale the threshold down,
// to a limit of 1%. Thus the smaller the heap is, the more likely it is to expand,
// though the scaling code will likely keep the increase small.
if (_g1h->capacity() <= _g1h->max_capacity() / 2) {
threshold *= (double)_g1h->capacity() / (double)(_g1h->max_capacity() / 2);
@@ -69,21 +69,21 @@
double long_term_pause_time_ratio = _analytics->long_term_pause_time_ratio();
double short_term_pause_time_ratio = _analytics->short_term_pause_time_ratio();
size_t expand_bytes = 0;
if (_g1h->capacity() == _g1h->max_capacity()) {
- log_trace(gc, ergo, heap)("Can not expand (heap already fully expanded) "
+ log_trace(gc, ergo, heap)("Cannot expand (heap already fully expanded) "
"long term GC overhead: %1.2f%% committed: " SIZE_FORMAT "B",
long_term_pause_time_ratio * 100.0, _g1h->capacity());
clear_ratio_check_data();
return expand_bytes;
}
- const double pause_time_ratio = 1.0 / (1.0 + GCTimeRatio);
+ const double pause_time_threshold = 1.0 / (1.0 + GCTimeRatio);
- double threshold = scale_with_heap(pause_time_ratio);
+ double threshold = scale_with_heap(pause_time_threshold);
// If the last GC time ratio is over the threshold, increment the count of
// times it has been exceeded, and add this ratio to the sum of exceeded
// ratios.
if (short_term_pause_time_ratio > threshold) {
@@ -123,13 +123,13 @@
if (committed_bytes < InitialHeapSize / 4) {
expand_bytes = (InitialHeapSize - committed_bytes) / 2;
} else {
double const MinScaleDownFactor = 0.2;
double const MaxScaleUpFactor = 2;
- double const StartScaleDownAt = pause_time_ratio;
- double const StartScaleUpAt = pause_time_ratio * 1.5;
- double const ScaleUpRange = pause_time_ratio * 2.0;
+ double const StartScaleDownAt = pause_time_threshold;
+ double const StartScaleUpAt = pause_time_threshold * 1.5;
+ double const ScaleUpRange = pause_time_threshold * 2.0;
double ratio_delta;
if (filled_history_buffer) {
ratio_delta = long_term_pause_time_ratio - threshold;
} else {
< prev index next >