2517 if (BackgroundCompilation && (CompileTheWorld || ReplayCompiles)) {
2518 if (!FLAG_IS_DEFAULT(BackgroundCompilation)) {
2519 warning("BackgroundCompilation disabled due to CompileTheWorld or ReplayCompiles options.");
2520 }
2521 FLAG_SET_CMDLINE(bool, BackgroundCompilation, false);
2522 }
2523 if (UseCompiler && is_interpreter_only()) {
2524 if (!FLAG_IS_DEFAULT(UseCompiler)) {
2525 warning("UseCompiler disabled due to -Xint.");
2526 }
2527 FLAG_SET_CMDLINE(bool, UseCompiler, false);
2528 }
2529 #ifdef COMPILER2
2530 if (PostLoopMultiversioning && !RangeCheckElimination) {
2531 if (!FLAG_IS_DEFAULT(PostLoopMultiversioning)) {
2532 warning("PostLoopMultiversioning disabled because RangeCheckElimination is disabled.");
2533 }
2534 FLAG_SET_CMDLINE(bool, PostLoopMultiversioning, false);
2535 }
2536 #endif
2537 return status;
2538 }
2539
2540 bool Arguments::is_bad_option(const JavaVMOption* option, jboolean ignore,
2541 const char* option_type) {
2542 if (ignore) return false;
2543
2544 const char* spacer = " ";
2545 if (option_type == NULL) {
2546 option_type = ++spacer; // Set both to the empty string.
2547 }
2548
2549 if (os::obsolete_option(option)) {
2550 jio_fprintf(defaultStream::error_stream(),
2551 "Obsolete %s%soption: %s\n", option_type, spacer,
2552 option->optionString);
2553 return false;
2554 } else {
2555 jio_fprintf(defaultStream::error_stream(),
2556 "Unrecognized %s%soption: %s\n", option_type, spacer,
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 return JNI_OK;
4618 }
4619
4620 jint Arguments::adjust_after_os() {
4621 if (UseNUMA) {
4622 if (UseParallelGC || UseParallelOldGC) {
4623 if (FLAG_IS_DEFAULT(MinHeapDeltaBytes)) {
4624 FLAG_SET_DEFAULT(MinHeapDeltaBytes, 64*M);
4625 }
4626 }
4627 // UseNUMAInterleaving is set to ON for all collectors and
4628 // platforms when UseNUMA is set to ON. NUMA-aware collectors
4629 // such as the parallel collector for Linux and Solaris will
4630 // interleave old gen and survivor spaces on top of NUMA
4631 // allocation policy for the eden space.
4632 // Non NUMA-aware collectors such as CMS, G1 and Serial-GC on
4633 // all platforms and ParallelGC on Windows will interleave all
4634 // of the heap spaces across NUMA nodes.
4635 if (FLAG_IS_DEFAULT(UseNUMAInterleaving)) {
4636 FLAG_SET_ERGO(bool, UseNUMAInterleaving, true);
4637 }
4638 }
4639 return JNI_OK;
4640 }
4641
4642 int Arguments::PropertyList_count(SystemProperty* pl) {
|
2517 if (BackgroundCompilation && (CompileTheWorld || ReplayCompiles)) {
2518 if (!FLAG_IS_DEFAULT(BackgroundCompilation)) {
2519 warning("BackgroundCompilation disabled due to CompileTheWorld or ReplayCompiles options.");
2520 }
2521 FLAG_SET_CMDLINE(bool, BackgroundCompilation, false);
2522 }
2523 if (UseCompiler && is_interpreter_only()) {
2524 if (!FLAG_IS_DEFAULT(UseCompiler)) {
2525 warning("UseCompiler disabled due to -Xint.");
2526 }
2527 FLAG_SET_CMDLINE(bool, UseCompiler, false);
2528 }
2529 #ifdef COMPILER2
2530 if (PostLoopMultiversioning && !RangeCheckElimination) {
2531 if (!FLAG_IS_DEFAULT(PostLoopMultiversioning)) {
2532 warning("PostLoopMultiversioning disabled because RangeCheckElimination is disabled.");
2533 }
2534 FLAG_SET_CMDLINE(bool, PostLoopMultiversioning, false);
2535 }
2536 #endif
2537 if (!FLAG_IS_DEFAULT(AllocateHeapAt)) {
2538 if ((UseNUMAInterleaving && !FLAG_IS_DEFAULT(UseNUMAInterleaving)) || (UseNUMA && !FLAG_IS_DEFAULT(UseNUMA))) {
2539 log_warning(arguments) ("NUMA support for Heap depends on the file system when AllocateHeapAt option is used.\n");
2540 }
2541 }
2542 return status;
2543 }
2544
2545 bool Arguments::is_bad_option(const JavaVMOption* option, jboolean ignore,
2546 const char* option_type) {
2547 if (ignore) return false;
2548
2549 const char* spacer = " ";
2550 if (option_type == NULL) {
2551 option_type = ++spacer; // Set both to the empty string.
2552 }
2553
2554 if (os::obsolete_option(option)) {
2555 jio_fprintf(defaultStream::error_stream(),
2556 "Obsolete %s%soption: %s\n", option_type, spacer,
2557 option->optionString);
2558 return false;
2559 } else {
2560 jio_fprintf(defaultStream::error_stream(),
2561 "Unrecognized %s%soption: %s\n", option_type, spacer,
4607 }
4608
4609 // Apply CPU specific policy for the BiasedLocking
4610 if (UseBiasedLocking) {
4611 if (!VM_Version::use_biased_locking() &&
4612 !(FLAG_IS_CMDLINE(UseBiasedLocking))) {
4613 UseBiasedLocking = false;
4614 }
4615 }
4616 #ifdef COMPILER2
4617 if (!UseBiasedLocking || EmitSync != 0) {
4618 UseOptoBiasInlining = false;
4619 }
4620 #endif
4621
4622 return JNI_OK;
4623 }
4624
4625 jint Arguments::adjust_after_os() {
4626 if (UseNUMA) {
4627 if (!FLAG_IS_DEFAULT(AllocateHeapAt)) {
4628 FLAG_SET_ERGO(bool, UseNUMA, false);
4629 } else if (UseParallelGC || UseParallelOldGC) {
4630 if (FLAG_IS_DEFAULT(MinHeapDeltaBytes)) {
4631 FLAG_SET_DEFAULT(MinHeapDeltaBytes, 64*M);
4632 }
4633 }
4634 // UseNUMAInterleaving is set to ON for all collectors and
4635 // platforms when UseNUMA is set to ON. NUMA-aware collectors
4636 // such as the parallel collector for Linux and Solaris will
4637 // interleave old gen and survivor spaces on top of NUMA
4638 // allocation policy for the eden space.
4639 // Non NUMA-aware collectors such as CMS, G1 and Serial-GC on
4640 // all platforms and ParallelGC on Windows will interleave all
4641 // of the heap spaces across NUMA nodes.
4642 if (FLAG_IS_DEFAULT(UseNUMAInterleaving)) {
4643 FLAG_SET_ERGO(bool, UseNUMAInterleaving, true);
4644 }
4645 }
4646 return JNI_OK;
4647 }
4648
4649 int Arguments::PropertyList_count(SystemProperty* pl) {
|