< prev index next >

src/hotspot/share/runtime/arguments.cpp

Print this page
*** 4039,10 ***
--- 4039,22 ---
    if (FLAG_IS_CMDLINE(CompilationMode)) {
      warning("CompilationMode has no effect in non-tiered VMs");
    }
  #endif
  
+   TSAN_RUNTIME_ONLY(
+     // Currently TSAN is only implemented for interpreter.
+     set_mode_flags(_int);
+     // TSAN instrumentation is not implemented for the RewriteBytecodes
+     // code paths because TSAN slows down the application so much that the
+     // performance benefits from rewriting bytecodes is negligible.
+     FLAG_SET_ERGO(RewriteBytecodes, false);
+     FLAG_SET_ERGO(RewriteFrequentPairs, false);
+     // Turn off CDS, it interferes with eagerly allocating jmethodIDs.
+     no_shared_spaces("CDS is not compatible with TSAN");
+   );
+ 
    return JNI_OK;
  }
  
  jint Arguments::apply_ergo() {
    // Set flags based on ergonomics.
< prev index next >