< prev index next >

src/hotspot/share/runtime/arguments.cpp

Print this page
rev 47415 : Add Thread Local handshakes and thread local polling


  33 #include "gc/shared/referenceProcessor.hpp"
  34 #include "gc/shared/taskqueue.hpp"
  35 #include "logging/log.hpp"
  36 #include "logging/logConfiguration.hpp"
  37 #include "logging/logStream.hpp"
  38 #include "logging/logTag.hpp"
  39 #include "memory/allocation.inline.hpp"
  40 #include "memory/universe.inline.hpp"
  41 #include "oops/oop.inline.hpp"
  42 #include "prims/jvm.h"
  43 #include "prims/jvmtiExport.hpp"
  44 #include "runtime/arguments.hpp"
  45 #include "runtime/arguments_ext.hpp"
  46 #include "runtime/commandLineFlagConstraintList.hpp"
  47 #include "runtime/commandLineFlagWriteableList.hpp"
  48 #include "runtime/commandLineFlagRangeList.hpp"
  49 #include "runtime/globals.hpp"
  50 #include "runtime/globals_extension.hpp"
  51 #include "runtime/java.hpp"
  52 #include "runtime/os.hpp"

  53 #include "runtime/vm_version.hpp"
  54 #include "services/management.hpp"
  55 #include "services/memTracker.hpp"
  56 #include "utilities/align.hpp"
  57 #include "utilities/defaultStream.hpp"
  58 #include "utilities/macros.hpp"
  59 #include "utilities/stringUtils.hpp"
  60 #if INCLUDE_JVMCI
  61 #include "jvmci/jvmciRuntime.hpp"
  62 #endif
  63 #if INCLUDE_ALL_GCS
  64 #include "gc/cms/compactibleFreeListSpace.hpp"
  65 #include "gc/g1/g1CollectedHeap.inline.hpp"
  66 #include "gc/parallel/parallelScavengeHeap.hpp"
  67 #endif // INCLUDE_ALL_GCS
  68 
  69 // Note: This is a special bug reporting site for the JVM
  70 #define DEFAULT_VENDOR_URL_BUG "http://bugreport.java.com/bugreport/crash.jsp"
  71 #define DEFAULT_JAVA_LAUNCHER  "generic"
  72 


4595     }
4596   }
4597 #endif // PRODUCT
4598 
4599   if (PrintCommandLineFlags) {
4600     CommandLineFlags::printSetFlags(tty);
4601   }
4602 
4603   // Apply CPU specific policy for the BiasedLocking
4604   if (UseBiasedLocking) {
4605     if (!VM_Version::use_biased_locking() &&
4606         !(FLAG_IS_CMDLINE(UseBiasedLocking))) {
4607       UseBiasedLocking = false;
4608     }
4609   }
4610 #ifdef COMPILER2
4611   if (!UseBiasedLocking || EmitSync != 0) {
4612     UseOptoBiasInlining = false;
4613   }
4614 #endif













4615 
4616   return JNI_OK;
4617 }
4618 
4619 jint Arguments::adjust_after_os() {
4620   if (UseNUMA) {
4621     if (UseParallelGC || UseParallelOldGC) {
4622       if (FLAG_IS_DEFAULT(MinHeapDeltaBytes)) {
4623          FLAG_SET_DEFAULT(MinHeapDeltaBytes, 64*M);
4624       }
4625     }
4626     // UseNUMAInterleaving is set to ON for all collectors and
4627     // platforms when UseNUMA is set to ON. NUMA-aware collectors
4628     // such as the parallel collector for Linux and Solaris will
4629     // interleave old gen and survivor spaces on top of NUMA
4630     // allocation policy for the eden space.
4631     // Non NUMA-aware collectors such as CMS, G1 and Serial-GC on
4632     // all platforms and ParallelGC on Windows will interleave all
4633     // of the heap spaces across NUMA nodes.
4634     if (FLAG_IS_DEFAULT(UseNUMAInterleaving)) {




  33 #include "gc/shared/referenceProcessor.hpp"
  34 #include "gc/shared/taskqueue.hpp"
  35 #include "logging/log.hpp"
  36 #include "logging/logConfiguration.hpp"
  37 #include "logging/logStream.hpp"
  38 #include "logging/logTag.hpp"
  39 #include "memory/allocation.inline.hpp"
  40 #include "memory/universe.inline.hpp"
  41 #include "oops/oop.inline.hpp"
  42 #include "prims/jvm.h"
  43 #include "prims/jvmtiExport.hpp"
  44 #include "runtime/arguments.hpp"
  45 #include "runtime/arguments_ext.hpp"
  46 #include "runtime/commandLineFlagConstraintList.hpp"
  47 #include "runtime/commandLineFlagWriteableList.hpp"
  48 #include "runtime/commandLineFlagRangeList.hpp"
  49 #include "runtime/globals.hpp"
  50 #include "runtime/globals_extension.hpp"
  51 #include "runtime/java.hpp"
  52 #include "runtime/os.hpp"
  53 #include "runtime/safepointMechanism.hpp"
  54 #include "runtime/vm_version.hpp"
  55 #include "services/management.hpp"
  56 #include "services/memTracker.hpp"
  57 #include "utilities/align.hpp"
  58 #include "utilities/defaultStream.hpp"
  59 #include "utilities/macros.hpp"
  60 #include "utilities/stringUtils.hpp"
  61 #if INCLUDE_JVMCI
  62 #include "jvmci/jvmciRuntime.hpp"
  63 #endif
  64 #if INCLUDE_ALL_GCS
  65 #include "gc/cms/compactibleFreeListSpace.hpp"
  66 #include "gc/g1/g1CollectedHeap.inline.hpp"
  67 #include "gc/parallel/parallelScavengeHeap.hpp"
  68 #endif // INCLUDE_ALL_GCS
  69 
  70 // Note: This is a special bug reporting site for the JVM
  71 #define DEFAULT_VENDOR_URL_BUG "http://bugreport.java.com/bugreport/crash.jsp"
  72 #define DEFAULT_JAVA_LAUNCHER  "generic"
  73 


4596     }
4597   }
4598 #endif // PRODUCT
4599 
4600   if (PrintCommandLineFlags) {
4601     CommandLineFlags::printSetFlags(tty);
4602   }
4603 
4604   // Apply CPU specific policy for the BiasedLocking
4605   if (UseBiasedLocking) {
4606     if (!VM_Version::use_biased_locking() &&
4607         !(FLAG_IS_CMDLINE(UseBiasedLocking))) {
4608       UseBiasedLocking = false;
4609     }
4610   }
4611 #ifdef COMPILER2
4612   if (!UseBiasedLocking || EmitSync != 0) {
4613     UseOptoBiasInlining = false;
4614   }
4615 #endif
4616 
4617   bool aot_enabled = UseAOT && ((AOTLibrary != NULL) || !FLAG_IS_DEFAULT(UseAOT));
4618   bool jvmci_enabled = NOT_JVMCI(false) JVMCI_ONLY(EnableJVMCI || UseJVMCICompiler);
4619   bool handshakes_supported = SafepointMechanism::supports_thread_local_poll() && !aot_enabled && !jvmci_enabled;
4620   if (handshakes_supported) {
4621     if (FLAG_IS_DEFAULT(UseAOT)) {
4622       FLAG_SET_DEFAULT(UseAOT, false); // Clear the AOT flag to make sure it doesn't try to initialize.
4623     }
4624     if (FLAG_IS_DEFAULT(ThreadLocalHandshakes) && !ThreadLocalHandshakes) {
4625       FLAG_SET_ERGO(bool, ThreadLocalHandshakes, true);
4626       log_info(ergo)("Enabling ThreadLocalHandshakes on supported platform");
4627     }
4628   }
4629 
4630   return JNI_OK;
4631 }
4632 
4633 jint Arguments::adjust_after_os() {
4634   if (UseNUMA) {
4635     if (UseParallelGC || UseParallelOldGC) {
4636       if (FLAG_IS_DEFAULT(MinHeapDeltaBytes)) {
4637          FLAG_SET_DEFAULT(MinHeapDeltaBytes, 64*M);
4638       }
4639     }
4640     // UseNUMAInterleaving is set to ON for all collectors and
4641     // platforms when UseNUMA is set to ON. NUMA-aware collectors
4642     // such as the parallel collector for Linux and Solaris will
4643     // interleave old gen and survivor spaces on top of NUMA
4644     // allocation policy for the eden space.
4645     // Non NUMA-aware collectors such as CMS, G1 and Serial-GC on
4646     // all platforms and ParallelGC on Windows will interleave all
4647     // of the heap spaces across NUMA nodes.
4648     if (FLAG_IS_DEFAULT(UseNUMAInterleaving)) {


< prev index next >