8268387: Rename maximum compaction to maximal compaction in G1

Reviewed-by: ayang, tschatzl
This commit is contained in:
Stephanie Crater 2022-02-07 12:43:28 +00:00 committed by Thomas Schatzl
parent 76677716ab
commit 22a1a32c7e
6 changed files with 21 additions and 21 deletions

@ -1098,7 +1098,7 @@ void G1CollectedHeap::verify_after_full_collection() {
bool G1CollectedHeap::do_full_collection(bool explicit_gc,
bool clear_all_soft_refs,
bool do_maximum_compaction) {
bool do_maximal_compaction) {
assert_at_safepoint_on_vm_thread();
if (GCLocker::check_active_before_gc()) {
@ -1111,7 +1111,7 @@ bool G1CollectedHeap::do_full_collection(bool explicit_gc,
G1FullGCMark gc_mark;
GCTraceTime(Info, gc) tm("Pause Full", NULL, gc_cause(), true);
G1FullCollector collector(this, explicit_gc, do_clear_all_soft_refs, do_maximum_compaction);
G1FullCollector collector(this, explicit_gc, do_clear_all_soft_refs, do_maximal_compaction);
collector.prepare_collection();
collector.collect();
@ -1125,12 +1125,12 @@ void G1CollectedHeap::do_full_collection(bool clear_all_soft_refs) {
// Currently, there is no facility in the do_full_collection(bool) API to notify
// the caller that the collection did not succeed (e.g., because it was locked
// out by the GC locker). So, right now, we'll ignore the return value.
// When clear_all_soft_refs is set we want to do a maximum compaction
// When clear_all_soft_refs is set we want to do a maximal compaction
// not leaving any dead wood.
bool do_maximum_compaction = clear_all_soft_refs;
bool do_maximal_compaction = clear_all_soft_refs;
bool dummy = do_full_collection(true, /* explicit_gc */
clear_all_soft_refs,
do_maximum_compaction);
do_maximal_compaction);
}
bool G1CollectedHeap::upgrade_to_full_collection() {
@ -1138,7 +1138,7 @@ bool G1CollectedHeap::upgrade_to_full_collection() {
log_info(gc, ergo)("Attempting full compaction clearing soft references");
bool success = do_full_collection(false /* explicit gc */,
true /* clear_all_soft_refs */,
false /* do_maximum_compaction */);
false /* do_maximal_compaction */);
// do_full_collection only fails if blocked by GC locker and that can't
// be the case here since we only call this when already completed one gc.
assert(success, "invariant");
@ -1162,7 +1162,7 @@ void G1CollectedHeap::resize_heap_if_necessary() {
HeapWord* G1CollectedHeap::satisfy_failed_allocation_helper(size_t word_size,
bool do_gc,
bool maximum_compaction,
bool maximal_compaction,
bool expect_null_mutator_alloc_region,
bool* gc_succeeded) {
*gc_succeeded = true;
@ -1186,16 +1186,16 @@ HeapWord* G1CollectedHeap::satisfy_failed_allocation_helper(size_t word_size,
if (do_gc) {
GCCauseSetter compaction(this, GCCause::_g1_compaction_pause);
// Expansion didn't work, we'll try to do a Full GC.
// If maximum_compaction is set we clear all soft references and don't
// If maximal_compaction is set we clear all soft references and don't
// allow any dead wood to be left on the heap.
if (maximum_compaction) {
log_info(gc, ergo)("Attempting maximum full compaction clearing soft references");
if (maximal_compaction) {
log_info(gc, ergo)("Attempting maximal full compaction clearing soft references");
} else {
log_info(gc, ergo)("Attempting full compaction");
}
*gc_succeeded = do_full_collection(false, /* explicit_gc */
maximum_compaction /* clear_all_soft_refs */ ,
maximum_compaction /* do_maximum_compaction */);
maximal_compaction /* clear_all_soft_refs */ ,
maximal_compaction /* do_maximal_compaction */);
}
return NULL;

@ -486,13 +486,13 @@ private:
// otherwise it's for a failed allocation.
// - if clear_all_soft_refs is true, all soft references should be
// cleared during the GC.
// - if do_maximum_compaction is true, full gc will do a maximally
// - if do_maximal_compaction is true, full gc will do a maximally
// compacting collection, leaving no dead wood.
// - it returns false if it is unable to do the collection due to the
// GC locker being active, true otherwise.
bool do_full_collection(bool explicit_gc,
bool clear_all_soft_refs,
bool do_maximum_compaction);
bool do_maximal_compaction);
// Callback from VM_G1CollectFull operation, or collect_as_vm_thread.
void do_full_collection(bool clear_all_soft_refs) override;
@ -518,7 +518,7 @@ private:
// Helper method for satisfy_failed_allocation()
HeapWord* satisfy_failed_allocation_helper(size_t word_size,
bool do_gc,
bool maximum_compaction,
bool maximal_compaction,
bool expect_null_mutator_alloc_region,
bool* gc_succeeded);

@ -111,9 +111,9 @@ uint G1FullCollector::calc_active_workers() {
G1FullCollector::G1FullCollector(G1CollectedHeap* heap,
bool explicit_gc,
bool clear_soft_refs,
bool do_maximum_compaction) :
bool do_maximal_compaction) :
_heap(heap),
_scope(heap->monitoring_support(), explicit_gc, clear_soft_refs, do_maximum_compaction),
_scope(heap->monitoring_support(), explicit_gc, clear_soft_refs, do_maximal_compaction),
_num_workers(calc_active_workers()),
_oop_queue_set(_num_workers),
_array_queue_set(_num_workers),

@ -93,7 +93,7 @@ public:
G1FullCollector(G1CollectedHeap* heap,
bool explicit_gc,
bool clear_soft_refs,
bool do_maximum_compaction);
bool do_maximal_compaction);
~G1FullCollector();
void prepare_collection();

@ -38,7 +38,7 @@ G1FullGCJFRTracerMark::~G1FullGCJFRTracerMark() {
G1FullGCScope::G1FullGCScope(G1MonitoringSupport* monitoring_support,
bool explicit_gc,
bool clear_soft,
bool do_maximum_compaction) :
bool do_maximal_compaction) :
_rm(),
_explicit_gc(explicit_gc),
_g1h(G1CollectedHeap::heap()),
@ -50,7 +50,7 @@ G1FullGCScope::G1FullGCScope(G1MonitoringSupport* monitoring_support,
_soft_refs(clear_soft, _g1h->soft_ref_policy()),
_monitoring_scope(monitoring_support, true /* full_gc */, true /* all_memory_pools_affected */),
_heap_printer(_g1h),
_region_compaction_threshold(do_maximum_compaction ?
_region_compaction_threshold(do_maximal_compaction ?
HeapRegion::GrainWords :
(1 - MarkSweepDeadRatio / 100.0) * HeapRegion::GrainWords) { }

@ -52,7 +52,7 @@ void VM_G1CollectFull::doit() {
GCCauseSetter x(g1h, _gc_cause);
_gc_succeeded = g1h->do_full_collection(true /* explicit_gc */,
false /* clear_all_soft_refs */,
false /* do_maximum_compaction */);
false /* do_maximal_compaction */);
}
VM_G1TryInitiateConcMark::VM_G1TryInitiateConcMark(uint gc_count_before,