diff --git a/src/hotspot/share/gc/parallel/psParallelCompact.cpp b/src/hotspot/share/gc/parallel/psParallelCompact.cpp index 30b73ad3e56..8ac16e059b1 100644 --- a/src/hotspot/share/gc/parallel/psParallelCompact.cpp +++ b/src/hotspot/share/gc/parallel/psParallelCompact.cpp @@ -1273,10 +1273,6 @@ bool PSParallelCompact::invoke(bool maximum_heap_compaction) { IsGCActiveMark mark; - if (ScavengeBeforeFullGC) { - PSScavenge::invoke_no_policy(); - } - const bool clear_all_soft_refs = heap->soft_ref_policy()->should_clear_all_soft_refs(); diff --git a/src/hotspot/share/gc/serial/serialHeap.cpp b/src/hotspot/share/gc/serial/serialHeap.cpp index 44fedd3f940..efcc5307e9f 100644 --- a/src/hotspot/share/gc/serial/serialHeap.cpp +++ b/src/hotspot/share/gc/serial/serialHeap.cpp @@ -498,7 +498,7 @@ void SerialHeap::do_collection(bool full, IsGCActiveMark active_gc_mark; bool complete = full && (max_generation == OldGen); - bool old_collects_young = complete && !ScavengeBeforeFullGC; + bool old_collects_young = complete; bool do_young_collection = !old_collects_young && _young_gen->should_collect(full, size, is_tlab); const PreGenGCValues pre_gc_values = get_pre_gc_values(); diff --git a/src/hotspot/share/gc/shared/gcArguments.cpp b/src/hotspot/share/gc/shared/gcArguments.cpp index e9ab856a274..9736c0f7fdc 100644 --- a/src/hotspot/share/gc/shared/gcArguments.cpp +++ b/src/hotspot/share/gc/shared/gcArguments.cpp @@ -40,10 +40,6 @@ void GCArguments::initialize() { MarkSweepAlwaysCompactCount = 1; // Move objects every gc. } - if (!UseParallelGC && FLAG_IS_DEFAULT(ScavengeBeforeFullGC)) { - FLAG_SET_DEFAULT(ScavengeBeforeFullGC, false); - } - if (GCTimeLimit == 100) { // Turn off gc-overhead-limit-exceeded checks FLAG_SET_DEFAULT(UseGCOverheadLimit, false); diff --git a/src/hotspot/share/gc/shared/gc_globals.hpp b/src/hotspot/share/gc/shared/gc_globals.hpp index a3a1b03dfb9..af735a865dc 100644 --- a/src/hotspot/share/gc/shared/gc_globals.hpp +++ b/src/hotspot/share/gc/shared/gc_globals.hpp @@ -154,9 +154,6 @@ "Never tenure objects in eden, may tenure on overflow " \ "(ParallelGC only)") \ \ - product(bool, ScavengeBeforeFullGC, true, \ - "Scavenge youngest generation before each full GC.") \ - \ product(bool, ExplicitGCInvokesConcurrent, false, \ "A System.gc() request invokes a concurrent collection; " \ "(effective only when using concurrent collectors)") \ diff --git a/src/hotspot/share/gc/z/zDriver.cpp b/src/hotspot/share/gc/z/zDriver.cpp index f0da73a7f6c..3836f330142 100644 --- a/src/hotspot/share/gc/z/zDriver.cpp +++ b/src/hotspot/share/gc/z/zDriver.cpp @@ -310,8 +310,7 @@ static bool should_preclean_young(GCCause::Cause cause) { // catch that above and perform young gen pre-cleaning. assert(!should_clear_soft_references(cause), "Clearing soft references without pre-cleaning young gen"); - // Preclean young if implied by configuration - return ScavengeBeforeFullGC; + return false; } ZDriverMajor::ZDriverMajor() diff --git a/src/hotspot/share/runtime/arguments.cpp b/src/hotspot/share/runtime/arguments.cpp index 1091e4fab25..802ddee756f 100644 --- a/src/hotspot/share/runtime/arguments.cpp +++ b/src/hotspot/share/runtime/arguments.cpp @@ -541,6 +541,7 @@ static SpecialFlag const special_jvm_flags[] = { { "ParallelOldDeadWoodLimiterMean", JDK_Version::undefined(), JDK_Version::jdk(23), JDK_Version::jdk(24) }, { "ParallelOldDeadWoodLimiterStdDev", JDK_Version::undefined(), JDK_Version::jdk(23), JDK_Version::jdk(24) }, { "UseNeon", JDK_Version::undefined(), JDK_Version::jdk(23), JDK_Version::jdk(24) }, + { "ScavengeBeforeFullGC", JDK_Version::undefined(), JDK_Version::jdk(23), JDK_Version::jdk(24) }, #ifdef ASSERT { "DummyObsoleteTestFlag", JDK_Version::undefined(), JDK_Version::jdk(18), JDK_Version::undefined() }, #endif @@ -1715,11 +1716,6 @@ jint Arguments::set_aggressive_heap_flags() { return JNI_EINVAL; } - // This appears to improve mutator locality - if (FLAG_SET_CMDLINE(ScavengeBeforeFullGC, false) != JVMFlag::SUCCESS) { - return JNI_EINVAL; - } - return JNI_OK; } @@ -2735,10 +2731,6 @@ jint Arguments::parse_each_vm_init_arg(const JavaVMInitArgs* args, bool* patch_m if (FLAG_SET_CMDLINE(FullGCALot, true) != JVMFlag::SUCCESS) { return JNI_EINVAL; } - // disable scavenge before parallel mark-compact - if (FLAG_SET_CMDLINE(ScavengeBeforeFullGC, false) != JVMFlag::SUCCESS) { - return JNI_EINVAL; - } #endif #if !INCLUDE_MANAGEMENT } else if (match_option(option, "-XX:+ManagementServer")) { diff --git a/test/hotspot/jtreg/vmTestbase/gc/gctests/WeakReference/weak006/weak006.java b/test/hotspot/jtreg/vmTestbase/gc/gctests/WeakReference/weak006/weak006.java index 7c0a2e30607..82fda0a3bd3 100644 --- a/test/hotspot/jtreg/vmTestbase/gc/gctests/WeakReference/weak006/weak006.java +++ b/test/hotspot/jtreg/vmTestbase/gc/gctests/WeakReference/weak006/weak006.java @@ -32,7 +32,7 @@ * /test/lib * @build jdk.test.whitebox.WhiteBox * @run driver jdk.test.lib.helpers.ClassFileInstaller jdk.test.whitebox.WhiteBox - * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:+IgnoreUnrecognizedVMOptions -XX:-ScavengeBeforeFullGC gc.gctests.WeakReference.weak006.weak006 -t 1 + * @run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:+IgnoreUnrecognizedVMOptions gc.gctests.WeakReference.weak006.weak006 -t 1 */ package gc.gctests.WeakReference.weak006;