src/hotspot/share/gc/g1/g1Arguments.cpp
changeset 50624 724ed31f9d05
parent 49982 9042ffe5b7fe
child 50787 5f0266d16543
--- a/src/hotspot/share/gc/g1/g1Arguments.cpp	Tue Jun 19 09:08:39 2018 +0200
+++ b/src/hotspot/share/gc/g1/g1Arguments.cpp	Tue Jun 19 09:34:39 2018 +0200
@@ -122,6 +122,10 @@
     FLAG_SET_DEFAULT(GCPauseIntervalMillis, MaxGCPauseMillis + 1);
   }
 
+  if (FLAG_IS_DEFAULT(ParallelRefProcEnabled) && ParallelGCThreads > 1) {
+    FLAG_SET_DEFAULT(ParallelRefProcEnabled, true);
+  }
+
   log_trace(gc)("MarkStackSize: %uk  MarkStackSizeMax: %uk", (unsigned int) (MarkStackSize / K), (uint) (MarkStackSizeMax / K));
 
   // By default do not let the target stack size to be more than 1/4 of the entries