src/hotspot/share/gc/shared/gcArguments.cpp
changeset 49710 f67333fc42bd
parent 49629 b786280276dc
child 53116 bb03098c4dde
child 56448 76d86de267b9
--- a/src/hotspot/share/gc/shared/gcArguments.cpp	Fri Apr 06 11:37:28 2018 +0200
+++ b/src/hotspot/share/gc/shared/gcArguments.cpp	Fri Apr 06 11:37:31 2018 +0200
@@ -31,16 +31,26 @@
 #include "utilities/macros.hpp"
 
 void GCArguments::initialize() {
-#if INCLUDE_ALL_GCS
+  if (FullGCALot && FLAG_IS_DEFAULT(MarkSweepAlwaysCompactCount)) {
+    MarkSweepAlwaysCompactCount = 1;  // Move objects every gc.
+  }
+
+  if (!(UseParallelGC || UseParallelOldGC) && FLAG_IS_DEFAULT(ScavengeBeforeFullGC)) {
+    FLAG_SET_DEFAULT(ScavengeBeforeFullGC, false);
+  }
+
+  if (GCTimeLimit == 100) {
+    // Turn off gc-overhead-limit-exceeded checks
+    FLAG_SET_DEFAULT(UseGCOverheadLimit, false);
+  }
+
   if (MinHeapFreeRatio == 100) {
     // Keeping the heap 100% free is hard ;-) so limit it to 99%.
     FLAG_SET_ERGO(uintx, MinHeapFreeRatio, 99);
   }
 
-  // If class unloading is disabled, also disable concurrent class unloading.
   if (!ClassUnloading) {
-    FLAG_SET_CMDLINE(bool, CMSClassUnloadingEnabled, false);
+    // If class unloading is disabled, also disable concurrent class unloading.
     FLAG_SET_CMDLINE(bool, ClassUnloadingWithConcurrentMark, false);
   }
-#endif // INCLUDE_ALL_GCS
 }