8304809: Remove develop flag G1ExitOnExpansionFailure

Reviewed-by: ayang, kbarrett
This commit is contained in:
Thomas Schatzl 2023-03-27 08:17:43 +00:00
parent a5ffa079a0
commit 4acf20df7b
2 changed files with 6 additions and 19 deletions

View File

@ -1255,22 +1255,13 @@ bool G1CollectedHeap::expand(size_t expand_bytes, WorkerThreads* pretouch_worker
*expand_time_ms = (os::elapsedTime() - expand_heap_start_time_sec) * MILLIUNITS;
}
if (expanded_by > 0) {
size_t actual_expand_bytes = expanded_by * HeapRegion::GrainBytes;
assert(actual_expand_bytes <= aligned_expand_bytes, "post-condition");
policy()->record_new_heap_size(num_regions());
} else {
log_debug(gc, ergo, heap)("Did not expand the heap (heap expansion operation failed)");
assert(expanded_by > 0, "must have failed during commit.");
// The expansion of the virtual storage space was unsuccessful.
// Let's see if it was because we ran out of swap.
if (G1ExitOnExpansionFailure &&
_hrm.available() >= regions_to_expand) {
// We had head room...
vm_exit_out_of_memory(aligned_expand_bytes, OOM_MMAP_ERROR, "G1 heap expansion");
}
}
return expanded_by > 0;
size_t actual_expand_bytes = expanded_by * HeapRegion::GrainBytes;
assert(actual_expand_bytes <= aligned_expand_bytes, "post-condition");
policy()->record_new_heap_size(num_regions());
return true;
}
bool G1CollectedHeap::expand_single_region(uint node_index) {

View File

@ -236,10 +236,6 @@
develop(bool, G1VerifyCTCleanup, false, \
"Verify card table cleanup.") \
\
develop(bool, G1ExitOnExpansionFailure, false, \
"Raise a fatal VM exit out of memory failure in the event " \
" that heap expansion fails due to running out of swap.") \
\
product(uintx, G1MaxNewSizePercent, 60, EXPERIMENTAL, \
"Percentage (0-100) of the heap size to use as default " \
" maximum young gen size.") \