RFR: ZGC: stricter flag handling
Stefan Karlsson
stefan.karlsson at oracle.com
Wed May 23 07:53:43 UTC 2018
Hi all,
Please review this patch.
1) Check for -XX:ParallelGCThreads=0 and -XX:ConcGCThreads=0 and print
the same error message as G1.
2) Set ClassUnloading and ClassUnloadingWithConcurrentMark to false.
diff --git a/src/hotspot/share/gc/z/zArguments.cpp
b/src/hotspot/share/gc/z/zArguments.cpp
--- a/src/hotspot/share/gc/z/zArguments.cpp
+++ b/src/hotspot/share/gc/z/zArguments.cpp
@@ -53,11 +53,20 @@
FLAG_SET_DEFAULT(ParallelGCThreads, ZWorkers::calculate_nparallel());
}
+ if (ParallelGCThreads == 0) {
+ vm_exit_during_initialization("The flag -XX:+UseZGC can not be
combined with -XX:ParallelGCThreads=0");
+ }
+
// Select number of concurrent threads
if (FLAG_IS_DEFAULT(ConcGCThreads)) {
FLAG_SET_DEFAULT(ConcGCThreads, ZWorkers::calculate_nconcurrent());
}
+ if (ConcGCThreads == 0) {
+ vm_exit_during_initialization("The flag -XX:+UseZGC can not be
combined with -XX:ConcGCThreads=0");
+ }
+
+
#ifdef COMPILER2
// Enable loop strip mining by default
if (FLAG_IS_DEFAULT(UseCountedLoopSafepoints)) {
@@ -75,6 +84,10 @@
FLAG_SET_DEFAULT(UseCompressedOops, false);
FLAG_SET_DEFAULT(UseCompressedClassPointers, false);
+ // ClassUnloading not (yet) supported
+ FLAG_SET_DEFAULT(ClassUnloading, false);
+ FLAG_SET_DEFAULT(ClassUnloadingWithConcurrentMark, false);
+
// Verification before exit not (yet) supported
FLAG_SET_DEFAULT(VerifyBeforeExit, false);
}
Thanks,
StefanK
More information about the zgc-dev
mailing list