hotspot/src/share/vm/runtime/arguments.cpp
changeset 26939 93633340028d
parent 26932 33d6fa41d290
child 26940 b5b002c2980b
--- a/hotspot/src/share/vm/runtime/arguments.cpp	Wed Oct 01 16:09:01 2014 +0200
+++ b/hotspot/src/share/vm/runtime/arguments.cpp	Thu Oct 02 11:22:02 2014 +0200
@@ -1690,11 +1690,10 @@
 #ifdef COMPILER1
   FastTLABRefill = false;
 #endif
-  FLAG_SET_DEFAULT(ParallelGCThreads,
-                     Abstract_VM_Version::parallel_worker_threads());
+  FLAG_SET_DEFAULT(ParallelGCThreads, Abstract_VM_Version::parallel_worker_threads());
   if (ParallelGCThreads == 0) {
-    FLAG_SET_DEFAULT(ParallelGCThreads,
-                     Abstract_VM_Version::parallel_worker_threads());
+    assert(!FLAG_IS_DEFAULT(ParallelGCThreads), "The default value for ParallelGCThreads should not be 0.");
+    vm_exit_during_initialization("The flag -XX:+UseG1GC can not be combined with -XX:ParallelGCThreads=0", NULL);
   }
 
 #if INCLUDE_ALL_GCS