8185572: Enable AssumeMP by default on SPARC machines
authorpoonam
Tue, 15 Aug 2017 14:03:52 +0000
changeset 46815 58689a7ca4e0
parent 46814 2e45cd2fdcb6
child 46817 a27c007d05bb
child 46820 9380b77281d2
8185572: Enable AssumeMP by default on SPARC machines Reviewed-by: kvn, dholmes, bobv
hotspot/src/share/vm/runtime/arguments.cpp
--- a/hotspot/src/share/vm/runtime/arguments.cpp	Tue Aug 15 15:02:40 2017 +0300
+++ b/hotspot/src/share/vm/runtime/arguments.cpp	Tue Aug 15 14:03:52 2017 +0000
@@ -4462,6 +4462,16 @@
 
   set_shared_spaces_flags();
 
+#if defined(SPARC)
+  // BIS instructions require 'membar' instruction regardless of the number
+  // of CPUs because in virtualized/container environments which might use only 1
+  // CPU, BIS instructions may produce incorrect results.
+
+  if (FLAG_IS_DEFAULT(AssumeMP)) {
+    FLAG_SET_DEFAULT(AssumeMP, true);
+  }
+#endif
+
   // Check the GC selections again.
   if (!check_gc_consistency()) {
     return JNI_EINVAL;