RFR: Let ExplicitGCInvokesConcurrent be off by default

Aleksey Shipilev shade at redhat.com
Wed Sep 6 14:20:27 UTC 2017


Christine argues the default behavior for System.gc() should be left as Full STW GC. This patch does
it, while leaving the possibility to turn it the concurrent cycle back on.

$ hg diff
diff -r 096345a40169 src/share/vm/runtime/arguments.cpp
--- a/src/share/vm/runtime/arguments.cpp	Tue Sep 05 22:26:00 2017 +0200
+++ b/src/share/vm/runtime/arguments.cpp	Wed Sep 06 16:17:43 2017 +0200
@@ -2083,12 +2083,6 @@
   if (FLAG_IS_DEFAULT(UseBiasedLocking)) {
     FLAG_SET_DEFAULT(UseBiasedLocking, false);
   }
-
-  // Default System.gc() means full stop-the-world GC, which might surprise users.
-  // Replace it with full concurrent GC, unless user really wants otherwise.
-  if (FLAG_IS_DEFAULT(ExplicitGCInvokesConcurrent)) {
-    FLAG_SET_DEFAULT(ExplicitGCInvokesConcurrent, true);
-  }
 }

 void Arguments::set_gc_specific_flags() {
diff -r 096345a40169 test/gc/shenandoah/options/TestExplicitGC.java
--- a/test/gc/shenandoah/options/TestExplicitGC.java	Tue Sep 05 22:26:00 2017 +0200
+++ b/test/gc/shenandoah/options/TestExplicitGC.java	Wed Sep 06 16:17:43 2017 +0200
@@ -57,8 +57,8 @@
                                     TestExplicitGC.class.getName(),
                                     "test");
             OutputAnalyzer output = new OutputAnalyzer(pb.start());
-            output.shouldNotContain("Pause Full");
-            output.shouldContain("Pause Init Mark");
+            output.shouldContain("Pause Full");
+            output.shouldNotContain("Pause Init Mark");
         }

         {


Thanks,
-Aleksey



More information about the shenandoah-dev mailing list