8189729: Change _perc suffixes in identifiers to _percent
Reviewed-by: sjohanss, ehelin
--- a/src/hotspot/share/gc/g1/g1CollectionSet.cpp Mon Oct 23 11:46:38 2017 +0200
+++ b/src/hotspot/share/gc/g1/g1CollectionSet.cpp Mon Oct 23 11:46:54 2017 +0200
@@ -431,15 +431,15 @@
// Stop adding regions if the remaining reclaimable space is
// not above G1HeapWastePercent.
size_t reclaimable_bytes = cset_chooser()->remaining_reclaimable_bytes();
- double reclaimable_perc = _policy->reclaimable_bytes_perc(reclaimable_bytes);
+ double reclaimable_percent = _policy->reclaimable_bytes_percent(reclaimable_bytes);
double threshold = (double) G1HeapWastePercent;
- if (reclaimable_perc <= threshold) {
+ if (reclaimable_percent <= threshold) {
// We've added enough old regions that the amount of uncollected
// reclaimable space is at or below the waste threshold. Stop
// adding old regions to the CSet.
log_debug(gc, ergo, cset)("Finish adding old regions to CSet (reclaimable percentage not over threshold). "
"old %u regions, max %u regions, reclaimable: " SIZE_FORMAT "B (%1.2f%%) threshold: " UINTX_FORMAT "%%",
- old_region_length(), max_old_cset_length, reclaimable_bytes, reclaimable_perc, G1HeapWastePercent);
+ old_region_length(), max_old_cset_length, reclaimable_bytes, reclaimable_percent, G1HeapWastePercent);
break;
}
--- a/src/hotspot/share/gc/g1/g1DefaultPolicy.cpp Mon Oct 23 11:46:38 2017 +0200
+++ b/src/hotspot/share/gc/g1/g1DefaultPolicy.cpp Mon Oct 23 11:46:54 2017 +0200
@@ -1004,7 +1004,7 @@
record_pause(Cleanup, _mark_cleanup_start_sec, end_sec);
}
-double G1DefaultPolicy::reclaimable_bytes_perc(size_t reclaimable_bytes) const {
+double G1DefaultPolicy::reclaimable_bytes_percent(size_t reclaimable_bytes) const {
return percent_of(reclaimable_bytes, _g1->capacity());
}
@@ -1079,15 +1079,15 @@
// 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 reclaimable_percent = reclaimable_bytes_percent(reclaimable_bytes);
double threshold = (double) G1HeapWastePercent;
- if (reclaimable_perc <= threshold) {
+ 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_perc, G1HeapWastePercent);
+ 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_perc, G1HeapWastePercent);
+ true_action_str, cset_chooser()->remaining_regions(), reclaimable_bytes, reclaimable_percent, G1HeapWastePercent);
return true;
}
--- a/src/hotspot/share/gc/g1/g1DefaultPolicy.hpp Mon Oct 23 11:46:38 2017 +0200
+++ b/src/hotspot/share/gc/g1/g1DefaultPolicy.hpp Mon Oct 23 11:46:54 2017 +0200
@@ -241,7 +241,7 @@
// Returns the given amount of reclaimable bytes (that represents
// the amount of reclaimable space still to be collected) as a
// percentage of the current heap capacity.
- double reclaimable_bytes_perc(size_t reclaimable_bytes) const;
+ double reclaimable_bytes_percent(size_t reclaimable_bytes) const;
jlong collection_pause_end_millis() { return _collection_pause_end_millis; }
--- a/src/hotspot/share/gc/g1/g1HeapSizingPolicy.cpp Mon Oct 23 11:46:38 2017 +0200
+++ b/src/hotspot/share/gc/g1/g1HeapSizingPolicy.cpp Mon Oct 23 11:46:54 2017 +0200
@@ -51,9 +51,9 @@
assert(GCTimeRatio > 0,
"we should have set it to a default value set_g1_gc_flags() "
"if a user set it to 0");
- const double gc_overhead_perc = 100.0 * (1.0 / (1.0 + GCTimeRatio));
+ const double gc_overhead_percent = 100.0 * (1.0 / (1.0 + GCTimeRatio));
- double threshold = gc_overhead_perc;
+ double threshold = gc_overhead_percent;
size_t expand_bytes = 0;
// If the heap is at less than half its maximum size, scale the threshold down,
@@ -107,9 +107,9 @@
} else {
double const MinScaleDownFactor = 0.2;
double const MaxScaleUpFactor = 2;
- double const StartScaleDownAt = gc_overhead_perc;
- double const StartScaleUpAt = gc_overhead_perc * 1.5;
- double const ScaleUpRange = gc_overhead_perc * 2.0;
+ double const StartScaleDownAt = gc_overhead_percent;
+ double const StartScaleUpAt = gc_overhead_percent * 1.5;
+ double const ScaleUpRange = gc_overhead_percent * 2.0;
double ratio_delta;
if (filled_history_buffer) {
--- a/src/hotspot/share/gc/g1/g1Policy.hpp Mon Oct 23 11:46:38 2017 +0200
+++ b/src/hotspot/share/gc/g1/g1Policy.hpp Mon Oct 23 11:46:54 2017 +0200
@@ -89,7 +89,7 @@
// Returns the given amount of uncollected reclaimable space
// as a percentage of the current heap capacity.
- virtual double reclaimable_bytes_perc(size_t reclaimable_bytes) const = 0;
+ virtual double reclaimable_bytes_percent(size_t reclaimable_bytes) const = 0;
virtual ~G1Policy() {}