src/share/vm/runtime/arguments.cpp
Print this page
rev 7141 : [mq]: 8059527
@@ -1688,15 +1688,15 @@
void Arguments::set_g1_gc_flags() {
assert(UseG1GC, "Error");
#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.");
+ jio_fprintf(defaultStream::error_stream(), "The G1 GC can not be combined with -XX:ParallelGCThreads=0\n");
+ vm_exit(1);
}
#if INCLUDE_ALL_GCS
if (G1ConcRefinementThreads == 0) {
FLAG_SET_DEFAULT(G1ConcRefinementThreads, ParallelGCThreads);