< prev index next >

src/share/vm/runtime/arguments.cpp

Print this page
rev 8803 : Implementation improvements to pass JPRT

@@ -34,10 +34,11 @@
 #include "gc/shared/referenceProcessor.hpp"
 #include "gc/shared/taskqueue.hpp"
 #include "memory/allocation.inline.hpp"
 #include "memory/universe.inline.hpp"
 #include "oops/oop.inline.hpp"
+#include "opto/safepointTable.hpp"
 #include "prims/jvmtiExport.hpp"
 #include "runtime/arguments.hpp"
 #include "runtime/arguments_ext.hpp"
 #include "runtime/commandLineFlagConstraintList.hpp"
 #include "runtime/commandLineFlagRangeList.hpp"

@@ -1678,10 +1679,35 @@
     // (especially small GC stress tests that the main thing they do
     // is allocation). We might consider increase it further.
     FLAG_SET_DEFAULT(GCTimeRatio, 9);
   }
 
+#ifdef THREAD_LOCAL_SAFEPOINT_SUPPORT
+  if (!FLAG_IS_DEFAULT(G1ElideMembar) && G1ElideMembar) {
+    if (!FLAG_IS_DEFAULT(UseMembar) && !UseMembar) {
+      UseMembar = true;
+      jio_fprintf(defaultStream::error_stream(),
+                  "When G1ElideMembar is set, UseMembar must also be set\n");
+    } else {
+      UseMembar = true;
+    }
+    if (!FLAG_IS_DEFAULT(ThreadLocalSafepoints) && !ThreadLocalSafepoints) {
+      ThreadLocalSafepoints = true;
+      jio_fprintf(defaultStream::error_stream(),
+                  "When G1ElideMembar is set, ThreadLocalSafepoints must also be set\n");
+    } else {
+      ThreadLocalSafepoints = true;
+    }
+  }
+#else
+  if (G1ElideMembar) {
+    jio_fprintf(defaultStream::error_stream(),
+                "G1ElideMembar is not supported on this platform\n");
+    G1ElideMembar = false;
+  }
+#endif
+
   if (PrintGCDetails && Verbose) {
     tty->print_cr("MarkStackSize: %uk  MarkStackSizeMax: %uk",
       (unsigned int) (MarkStackSize / K), (uint) (MarkStackSizeMax / K));
     tty->print_cr("ConcGCThreads: %u", ConcGCThreads);
   }

@@ -3953,10 +3979,19 @@
   if (!UseBiasedLocking || EmitSync != 0) {
     UseOptoBiasInlining = false;
   }
 #endif
 
+#ifndef THREAD_LOCAL_SAFEPOINT_SUPPORT
+  if (ThreadLocalSafepoints) {
+    ThreadLocalSafepoints = false;
+    jio_fprintf(defaultStream::error_stream(),
+                "ThreadLocalSafepoints is not supported on this platform\n");
+
+  }
+#endif
+
   return JNI_OK;
 }
 
 jint Arguments::adjust_after_os() {
   if (UseNUMA) {
< prev index next >