< prev index next >

src/hotspot/share/runtime/arguments.cpp

Print this page




2516   if (BackgroundCompilation && (CompileTheWorld || ReplayCompiles)) {
2517     if (!FLAG_IS_DEFAULT(BackgroundCompilation)) {
2518       warning("BackgroundCompilation disabled due to CompileTheWorld or ReplayCompiles options.");
2519     }
2520     FLAG_SET_CMDLINE(bool, BackgroundCompilation, false);
2521   }
2522   if (UseCompiler && is_interpreter_only()) {
2523     if (!FLAG_IS_DEFAULT(UseCompiler)) {
2524       warning("UseCompiler disabled due to -Xint.");
2525     }
2526     FLAG_SET_CMDLINE(bool, UseCompiler, false);
2527   }
2528 #ifdef COMPILER2
2529   if (PostLoopMultiversioning && !RangeCheckElimination) {
2530     if (!FLAG_IS_DEFAULT(PostLoopMultiversioning)) {
2531       warning("PostLoopMultiversioning disabled because RangeCheckElimination is disabled.");
2532     }
2533     FLAG_SET_CMDLINE(bool, PostLoopMultiversioning, false);
2534   }
2535 #endif





2536   return status;
2537 }
2538 
2539 bool Arguments::is_bad_option(const JavaVMOption* option, jboolean ignore,
2540   const char* option_type) {
2541   if (ignore) return false;
2542 
2543   const char* spacer = " ";
2544   if (option_type == NULL) {
2545     option_type = ++spacer; // Set both to the empty string.
2546   }
2547 
2548   if (os::obsolete_option(option)) {
2549     jio_fprintf(defaultStream::error_stream(),
2550                 "Obsolete %s%soption: %s\n", option_type, spacer,
2551       option->optionString);
2552     return false;
2553   } else {
2554     jio_fprintf(defaultStream::error_stream(),
2555                 "Unrecognized %s%soption: %s\n", option_type, spacer,


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)) {
4635       FLAG_SET_ERGO(bool, UseNUMAInterleaving, true);
4636     }
4637   }
4638   return JNI_OK;
4639 }
4640 
4641 int Arguments::PropertyList_count(SystemProperty* pl) {




2516   if (BackgroundCompilation && (CompileTheWorld || ReplayCompiles)) {
2517     if (!FLAG_IS_DEFAULT(BackgroundCompilation)) {
2518       warning("BackgroundCompilation disabled due to CompileTheWorld or ReplayCompiles options.");
2519     }
2520     FLAG_SET_CMDLINE(bool, BackgroundCompilation, false);
2521   }
2522   if (UseCompiler && is_interpreter_only()) {
2523     if (!FLAG_IS_DEFAULT(UseCompiler)) {
2524       warning("UseCompiler disabled due to -Xint.");
2525     }
2526     FLAG_SET_CMDLINE(bool, UseCompiler, false);
2527   }
2528 #ifdef COMPILER2
2529   if (PostLoopMultiversioning && !RangeCheckElimination) {
2530     if (!FLAG_IS_DEFAULT(PostLoopMultiversioning)) {
2531       warning("PostLoopMultiversioning disabled because RangeCheckElimination is disabled.");
2532     }
2533     FLAG_SET_CMDLINE(bool, PostLoopMultiversioning, false);
2534   }
2535 #endif
2536   if (!FLAG_IS_DEFAULT(AllocateHeapAt)) {
2537     if ((UseNUMAInterleaving && !FLAG_IS_DEFAULT(UseNUMAInterleaving)) || (UseNUMA && !FLAG_IS_DEFAULT(UseNUMA))) {
2538       log_warning(arguments) ("NUMA support for Heap depends on the file system when AllocateHeapAt option is used.\n");
2539     }
2540   }
2541   return status;
2542 }
2543 
2544 bool Arguments::is_bad_option(const JavaVMOption* option, jboolean ignore,
2545   const char* option_type) {
2546   if (ignore) return false;
2547 
2548   const char* spacer = " ";
2549   if (option_type == NULL) {
2550     option_type = ++spacer; // Set both to the empty string.
2551   }
2552 
2553   if (os::obsolete_option(option)) {
2554     jio_fprintf(defaultStream::error_stream(),
2555                 "Obsolete %s%soption: %s\n", option_type, spacer,
2556       option->optionString);
2557     return false;
2558   } else {
2559     jio_fprintf(defaultStream::error_stream(),
2560                 "Unrecognized %s%soption: %s\n", option_type, spacer,


4606   }
4607 
4608   // Apply CPU specific policy for the BiasedLocking
4609   if (UseBiasedLocking) {
4610     if (!VM_Version::use_biased_locking() &&
4611         !(FLAG_IS_CMDLINE(UseBiasedLocking))) {
4612       UseBiasedLocking = false;
4613     }
4614   }
4615 #ifdef COMPILER2
4616   if (!UseBiasedLocking || EmitSync != 0) {
4617     UseOptoBiasInlining = false;
4618   }
4619 #endif
4620 
4621   return JNI_OK;
4622 }
4623 
4624 jint Arguments::adjust_after_os() {
4625   if (UseNUMA) {
4626     if(!FLAG_IS_DEFAULT(AllocateHeapAt)) {
4627       FLAG_SET_ERGO(bool, UseNUMA, false);
4628     } else if (UseParallelGC || UseParallelOldGC) {
4629       if (FLAG_IS_DEFAULT(MinHeapDeltaBytes)) {
4630          FLAG_SET_DEFAULT(MinHeapDeltaBytes, 64*M);
4631       }
4632     }
4633     // UseNUMAInterleaving is set to ON for all collectors and
4634     // platforms when UseNUMA is set to ON. NUMA-aware collectors
4635     // such as the parallel collector for Linux and Solaris will
4636     // interleave old gen and survivor spaces on top of NUMA
4637     // allocation policy for the eden space.
4638     // Non NUMA-aware collectors such as CMS, G1 and Serial-GC on
4639     // all platforms and ParallelGC on Windows will interleave all
4640     // of the heap spaces across NUMA nodes.
4641     if (FLAG_IS_DEFAULT(UseNUMAInterleaving)) {
4642       FLAG_SET_ERGO(bool, UseNUMAInterleaving, true);
4643     }
4644   }
4645   return JNI_OK;
4646 }
4647 
4648 int Arguments::PropertyList_count(SystemProperty* pl) {


< prev index next >