src/share/vm/runtime/arguments.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File hotspot.management Sdiff src/share/vm/runtime

src/share/vm/runtime/arguments.cpp

Print this page




2441       FLAG_SET_CMDLINE(uintx, NewSizeThreadIncrease, 16 * K);  // 20Kb per thread added to new generation
2442 
2443       // -Xinternalversion
2444     } else if (match_option(option, "-Xinternalversion", &tail)) {
2445       jio_fprintf(defaultStream::output_stream(), "%s\n",
2446                   VM_Version::internal_vm_info_string());
2447       vm_exit(0);
2448 #ifndef PRODUCT
2449     // -Xprintflags
2450     } else if (match_option(option, "-Xprintflags", &tail)) {
2451       CommandLineFlags::printFlags(tty, false);
2452       vm_exit(0);
2453 #endif
2454     // -D
2455     } else if (match_option(option, "-D", &tail)) {
2456       if (!add_property(tail)) {
2457         return JNI_ENOMEM;
2458       }
2459       // Out of the box management support
2460       if (match_option(option, "-Dcom.sun.management", &tail)) {

2461         FLAG_SET_CMDLINE(bool, ManagementServer, true);




2462       }
2463     // -Xint
2464     } else if (match_option(option, "-Xint", &tail)) {
2465           set_mode_flags(_int);
2466     // -Xmixed
2467     } else if (match_option(option, "-Xmixed", &tail)) {
2468           set_mode_flags(_mixed);
2469     // -Xcomp
2470     } else if (match_option(option, "-Xcomp", &tail)) {
2471       // for testing the compiler; turn off all flags that inhibit compilation
2472           set_mode_flags(_comp);
2473 
2474     // -Xshare:dump
2475     } else if (match_option(option, "-Xshare:dump", &tail)) {
2476 #if defined(KERNEL)
2477       vm_exit_during_initialization(
2478           "Dumping a shared archive is not supported on the Kernel JVM.", NULL);
2479 #elif !INCLUDE_CDS
2480       vm_exit_during_initialization(
2481           "Dumping a shared archive is not supported in this VM.", NULL);


2790                     "Invalid concurrent threads: %s\n", option->optionString);
2791         return JNI_EINVAL;
2792       }
2793       FLAG_SET_CMDLINE(uintx, ConcGCThreads, conc_threads);
2794     } else if (match_option(option, "-XX:MaxDirectMemorySize=", &tail)) {
2795       julong max_direct_memory_size = 0;
2796       ArgsRange errcode = parse_memory_size(tail, &max_direct_memory_size, 0);
2797       if (errcode != arg_in_range) {
2798         jio_fprintf(defaultStream::error_stream(),
2799                     "Invalid maximum direct memory size: %s\n",
2800                     option->optionString);
2801         describe_range_error(errcode);
2802         return JNI_EINVAL;
2803       }
2804       FLAG_SET_CMDLINE(uintx, MaxDirectMemorySize, max_direct_memory_size);
2805     } else if (match_option(option, "-XX:+UseVMInterruptibleIO", &tail)) {
2806       // NOTE! In JDK 9, the UseVMInterruptibleIO flag will completely go
2807       //       away and will cause VM initialization failures!
2808       warning("-XX:+UseVMInterruptibleIO is obsolete and will be removed in a future release.");
2809       FLAG_SET_CMDLINE(bool, UseVMInterruptibleIO, true);





2810     } else if (match_option(option, "-XX:", &tail)) { // -XX:xxxx
2811       // Skip -XX:Flags= since that case has already been handled
2812       if (strncmp(tail, "Flags=", strlen("Flags=")) != 0) {
2813         if (!process_argument(tail, args->ignoreUnrecognized, origin)) {
2814           return JNI_EINVAL;
2815         }
2816       }
2817     // Unknown option
2818     } else if (is_bad_option(option, args->ignoreUnrecognized)) {
2819       return JNI_ERR;
2820     }
2821   }
2822 
2823   // Change the default value for flags  which have different default values
2824   // when working with older JDKs.
2825 #ifdef LINUX
2826  if (JDK_Version::current().compare_major(6) <= 0 &&
2827       FLAG_IS_DEFAULT(UseLinuxPosixThreadCPUClocks)) {
2828     FLAG_SET_DEFAULT(UseLinuxPosixThreadCPUClocks, false);
2829   }




2441       FLAG_SET_CMDLINE(uintx, NewSizeThreadIncrease, 16 * K);  // 20Kb per thread added to new generation
2442 
2443       // -Xinternalversion
2444     } else if (match_option(option, "-Xinternalversion", &tail)) {
2445       jio_fprintf(defaultStream::output_stream(), "%s\n",
2446                   VM_Version::internal_vm_info_string());
2447       vm_exit(0);
2448 #ifndef PRODUCT
2449     // -Xprintflags
2450     } else if (match_option(option, "-Xprintflags", &tail)) {
2451       CommandLineFlags::printFlags(tty, false);
2452       vm_exit(0);
2453 #endif
2454     // -D
2455     } else if (match_option(option, "-D", &tail)) {
2456       if (!add_property(tail)) {
2457         return JNI_ENOMEM;
2458       }
2459       // Out of the box management support
2460       if (match_option(option, "-Dcom.sun.management", &tail)) {
2461 #if INCLUDE_MANAGEMENT
2462         FLAG_SET_CMDLINE(bool, ManagementServer, true);
2463 #else
2464         vm_exit_during_initialization(
2465             "-Dcom.sun.management is not supported in this VM.", NULL);
2466 #endif
2467       }
2468     // -Xint
2469     } else if (match_option(option, "-Xint", &tail)) {
2470           set_mode_flags(_int);
2471     // -Xmixed
2472     } else if (match_option(option, "-Xmixed", &tail)) {
2473           set_mode_flags(_mixed);
2474     // -Xcomp
2475     } else if (match_option(option, "-Xcomp", &tail)) {
2476       // for testing the compiler; turn off all flags that inhibit compilation
2477           set_mode_flags(_comp);
2478 
2479     // -Xshare:dump
2480     } else if (match_option(option, "-Xshare:dump", &tail)) {
2481 #if defined(KERNEL)
2482       vm_exit_during_initialization(
2483           "Dumping a shared archive is not supported on the Kernel JVM.", NULL);
2484 #elif !INCLUDE_CDS
2485       vm_exit_during_initialization(
2486           "Dumping a shared archive is not supported in this VM.", NULL);


2795                     "Invalid concurrent threads: %s\n", option->optionString);
2796         return JNI_EINVAL;
2797       }
2798       FLAG_SET_CMDLINE(uintx, ConcGCThreads, conc_threads);
2799     } else if (match_option(option, "-XX:MaxDirectMemorySize=", &tail)) {
2800       julong max_direct_memory_size = 0;
2801       ArgsRange errcode = parse_memory_size(tail, &max_direct_memory_size, 0);
2802       if (errcode != arg_in_range) {
2803         jio_fprintf(defaultStream::error_stream(),
2804                     "Invalid maximum direct memory size: %s\n",
2805                     option->optionString);
2806         describe_range_error(errcode);
2807         return JNI_EINVAL;
2808       }
2809       FLAG_SET_CMDLINE(uintx, MaxDirectMemorySize, max_direct_memory_size);
2810     } else if (match_option(option, "-XX:+UseVMInterruptibleIO", &tail)) {
2811       // NOTE! In JDK 9, the UseVMInterruptibleIO flag will completely go
2812       //       away and will cause VM initialization failures!
2813       warning("-XX:+UseVMInterruptibleIO is obsolete and will be removed in a future release.");
2814       FLAG_SET_CMDLINE(bool, UseVMInterruptibleIO, true);
2815 #if !INCLUDE_MANAGEMENT
2816     } else if (match_option(option, "-XX:+ManagementServer", &tail)) {
2817       vm_exit_during_initialization(
2818         "ManagementServer is not supported in this VM.", NULL);
2819 #endif // INCLUDE_MANAGEMENT
2820     } else if (match_option(option, "-XX:", &tail)) { // -XX:xxxx
2821       // Skip -XX:Flags= since that case has already been handled
2822       if (strncmp(tail, "Flags=", strlen("Flags=")) != 0) {
2823         if (!process_argument(tail, args->ignoreUnrecognized, origin)) {
2824           return JNI_EINVAL;
2825         }
2826       }
2827     // Unknown option
2828     } else if (is_bad_option(option, args->ignoreUnrecognized)) {
2829       return JNI_ERR;
2830     }
2831   }
2832 
2833   // Change the default value for flags  which have different default values
2834   // when working with older JDKs.
2835 #ifdef LINUX
2836  if (JDK_Version::current().compare_major(6) <= 0 &&
2837       FLAG_IS_DEFAULT(UseLinuxPosixThreadCPUClocks)) {
2838     FLAG_SET_DEFAULT(UseLinuxPosixThreadCPUClocks, false);
2839   }


src/share/vm/runtime/arguments.cpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File