8267836: Separate eager reclaim remembered set threshold from G1RSetSparseRegionEntries
Reviewed-by: sjohanss, lkorinth
This commit is contained in:
parent
bba3728e23
commit
2d494bffff
@ -49,7 +49,14 @@ void G1Arguments::initialize_alignments() {
|
|||||||
// size, but the heap size should be aligned with the region size. To get
|
// size, but the heap size should be aligned with the region size. To get
|
||||||
// around this we use the unaligned values for the heap.
|
// around this we use the unaligned values for the heap.
|
||||||
HeapRegion::setup_heap_region_size(MaxHeapSize);
|
HeapRegion::setup_heap_region_size(MaxHeapSize);
|
||||||
|
|
||||||
|
// The remembered set needs the heap regions set up.
|
||||||
HeapRegionRemSet::setup_remset_size();
|
HeapRegionRemSet::setup_remset_size();
|
||||||
|
// Needs remembered set initialization as the ergonomics are based
|
||||||
|
// on it.
|
||||||
|
if (FLAG_IS_DEFAULT(G1EagerReclaimRemSetThreshold)) {
|
||||||
|
FLAG_SET_ERGO(G1EagerReclaimRemSetThreshold, G1RSetSparseRegionEntries);
|
||||||
|
}
|
||||||
|
|
||||||
SpaceAlignment = HeapRegion::GrainBytes;
|
SpaceAlignment = HeapRegion::GrainBytes;
|
||||||
HeapAlignment = calculate_heap_alignment(SpaceAlignment);
|
HeapAlignment = calculate_heap_alignment(SpaceAlignment);
|
||||||
|
@ -2659,7 +2659,7 @@ bool G1CollectedHeap::is_potential_eager_reclaim_candidate(HeapRegion* r) const
|
|||||||
HeapRegionRemSet* rem_set = r->rem_set();
|
HeapRegionRemSet* rem_set = r->rem_set();
|
||||||
|
|
||||||
return G1EagerReclaimHumongousObjectsWithStaleRefs ?
|
return G1EagerReclaimHumongousObjectsWithStaleRefs ?
|
||||||
rem_set->occupancy_less_or_equal_than(G1RSetSparseRegionEntries) :
|
rem_set->occupancy_less_or_equal_than(G1EagerReclaimRemSetThreshold) :
|
||||||
G1EagerReclaimHumongousObjects && rem_set->is_empty();
|
G1EagerReclaimHumongousObjects && rem_set->is_empty();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1284,7 +1284,7 @@ class G1MergeHeapRootsTask : public AbstractGangTask {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
guarantee(r->rem_set()->occupancy_less_or_equal_than(G1RSetSparseRegionEntries),
|
guarantee(r->rem_set()->occupancy_less_or_equal_than(G1EagerReclaimRemSetThreshold),
|
||||||
"Found a not-small remembered set here. This is inconsistent with previous assumptions.");
|
"Found a not-small remembered set here. This is inconsistent with previous assumptions.");
|
||||||
|
|
||||||
_cl.dump_rem_set_for_region(r);
|
_cl.dump_rem_set_for_region(r);
|
||||||
|
@ -240,6 +240,11 @@
|
|||||||
"Try to reclaim dead large objects that have a few stale " \
|
"Try to reclaim dead large objects that have a few stale " \
|
||||||
"references at every young GC.") \
|
"references at every young GC.") \
|
||||||
\
|
\
|
||||||
|
product(uint, G1EagerReclaimRemSetThreshold, 0, EXPERIMENTAL, \
|
||||||
|
"Maximum number of remembered set entries a humongous region " \
|
||||||
|
"otherwise eligible for eager reclaim may have to be a candidate "\
|
||||||
|
"for eager reclaim. Will be selected ergonomically by default.") \
|
||||||
|
\
|
||||||
product(size_t, G1RebuildRemSetChunkSize, 256 * K, EXPERIMENTAL, \
|
product(size_t, G1RebuildRemSetChunkSize, 256 * K, EXPERIMENTAL, \
|
||||||
"Chunk size used for rebuilding the remembered set.") \
|
"Chunk size used for rebuilding the remembered set.") \
|
||||||
range(4 * K, 32 * M) \
|
range(4 * K, 32 * M) \
|
||||||
|
Loading…
Reference in New Issue
Block a user