mirror of
https://github.com/openjdk/jdk.git
synced 2026-05-14 07:29:51 +00:00
8189729: Change _perc suffixes in identifiers to _percent
Reviewed-by: sjohanss, ehelin
This commit is contained in:
parent
824e776c37
commit
be94d0ee28
@ -431,15 +431,15 @@ void G1CollectionSet::finalize_old_part(double time_remaining_ms) {
|
||||
// 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;
|
||||
}
|
||||
|
||||
|
||||
@ -1004,7 +1004,7 @@ void G1DefaultPolicy::record_concurrent_mark_cleanup_end() {
|
||||
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 @@ bool G1DefaultPolicy::next_gc_should_be_mixed(const char* true_action_str,
|
||||
|
||||
// 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;
|
||||
}
|
||||
|
||||
|
||||
@ -241,7 +241,7 @@ public:
|
||||
// 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; }
|
||||
|
||||
|
||||
@ -51,9 +51,9 @@ size_t G1HeapSizingPolicy::expansion_amount() {
|
||||
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 @@ size_t G1HeapSizingPolicy::expansion_amount() {
|
||||
} 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) {
|
||||
|
||||
@ -89,7 +89,7 @@ public:
|
||||
|
||||
// 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() {}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user