--- 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
}