diff src/share/vm/runtime/arguments.cpp @ 8845:1b90c7607451

2178143: JVM crashes if the number of bound CPUs changed during runtime Summary: Supply a new flag -XX:+AssumeMP to workaround the problem. With the flag is turned on, assume VM run on MP platform so is_MP() will return true that sync calls will not skip away. Reviewed-by: dholmes, acorn, dcubed, jmasa Contributed-by: yumin.qi@oracle.com
author minqi
date Wed, 27 Mar 2013 17:03:19 -0700
parents 36376b540a98
children c0f9217203b2
line wrap: on
line diff
--- a/src/share/vm/runtime/arguments.cpp	Wed Mar 27 13:26:44 2013 -0700
+++ b/src/share/vm/runtime/arguments.cpp	Wed Mar 27 17:03:19 2013 -0700
@@ -3325,6 +3325,13 @@
   }
   check_deprecated_gcs();
   check_deprecated_gc_flags();
+  if (AssumeMP && !UseSerialGC) {
+    if (FLAG_IS_DEFAULT(ParallelGCThreads) && ParallelGCThreads == 1) {
+      warning("If the number of processors is expected to increase from one, then"
+              " you should configure the number of parallel GC threads appropriately"
+              " using -XX:ParallelGCThreads=N");
+    }
+  }
 #else // INCLUDE_ALL_GCS
   assert(verify_serial_gc_flags(), "SerialGC unset");
 #endif // INCLUDE_ALL_GCS