changeset 9799:3d505f6c7af1 jdk8u144-b33

8185572: Enable AssumeMP by default on SPARC machines Reviewed-by: kvn, dholmes, bobv
author poonam
date Tue, 15 Aug 2017 14:03:52 +0000
parents dd7bdb77ffe8
children 0becf604dfcc
files src/share/vm/runtime/arguments.cpp
diffstat 1 files changed, 10 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/runtime/arguments.cpp	Wed Aug 16 22:24:56 2017 -0700
+++ b/src/share/vm/runtime/arguments.cpp	Tue Aug 15 14:03:52 2017 +0000
@@ -4058,6 +4058,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;