mirror of
https://github.com/openjdk/jdk.git
synced 2026-03-20 21:03:18 +00:00
8304809: Remove develop flag G1ExitOnExpansionFailure
Reviewed-by: ayang, kbarrett
This commit is contained in:
parent
a5ffa079a0
commit
4acf20df7b
@ -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) {
|
||||
|
||||
@ -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.") \
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user