2292 set_java_compiler(true); // "-Djava.compiler[=...]" most recently seen.
2293 }
2294 }
2295
2296 void Arguments::process_java_launcher_argument(const char* launcher, void* extra_info) {
2297 _sun_java_launcher = os::strdup_check_oom(launcher);
2298 }
2299
2300 bool Arguments::created_by_java_launcher() {
2301 assert(_sun_java_launcher != NULL, "property must have value");
2302 return strcmp(DEFAULT_JAVA_LAUNCHER, _sun_java_launcher) != 0;
2303 }
2304
2305 bool Arguments::sun_java_launcher_is_altjvm() {
2306 return _sun_java_launcher_is_altjvm;
2307 }
2308
2309 //===========================================================================================================
2310 // Parsing of main arguments
2311
2312 // Check consistency of GC selection
2313 bool Arguments::check_gc_consistency() {
2314 // Ensure that the user has not selected conflicting sets
2315 // of collectors.
2316 uint i = 0;
2317 if (UseSerialGC) i++;
2318 if (UseConcMarkSweepGC) i++;
2319 if (UseParallelGC || UseParallelOldGC) i++;
2320 if (UseG1GC) i++;
2321 if (i > 1) {
2322 jio_fprintf(defaultStream::error_stream(),
2323 "Conflicting collector combinations in option list; "
2324 "please refer to the release notes for the combinations "
2325 "allowed\n");
2326 return false;
2327 }
2328
2329 if (UseConcMarkSweepGC && !UseParNewGC) {
2330 jio_fprintf(defaultStream::error_stream(),
2331 "It is not possible to combine the DefNew young collector with the CMS collector.\n");
2388 }
2389
2390 if (VerifyBeforeExit) {
2391 warning("Heap verification at shutdown disabled "
2392 "(due to current incompatibility with FLSVerifyAllHeapReferences)");
2393 VerifyBeforeExit = false; // Disable verification at shutdown
2394 }
2395 }
2396
2397 if (PrintNMTStatistics) {
2398 #if INCLUDE_NMT
2399 if (MemTracker::tracking_level() == NMT_off) {
2400 #endif // INCLUDE_NMT
2401 warning("PrintNMTStatistics is disabled, because native memory tracking is not enabled");
2402 PrintNMTStatistics = false;
2403 #if INCLUDE_NMT
2404 }
2405 #endif
2406 }
2407 #if INCLUDE_JVMCI
2408 if (EnableJVMCI) {
2409 if (!ScavengeRootsInCode) {
2410 warning("forcing ScavengeRootsInCode non-zero because JVMCI is enabled");
2411 ScavengeRootsInCode = 1;
2412 }
2413 if (FLAG_IS_DEFAULT(TypeProfileLevel)) {
2414 TypeProfileLevel = 0;
2415 }
2416 if (UseJVMCICompiler) {
2417 if (FLAG_IS_DEFAULT(TypeProfileWidth)) {
2418 TypeProfileWidth = 8;
2419 }
2420 }
2421 }
2422 #endif
2423
2424 // Check lower bounds of the code cache
2425 // Template Interpreter code is approximately 3X larger in debug builds.
2426 uint min_code_cache_size = CodeCacheMinimumUseSpace DEBUG_ONLY(* 3);
2427 if (InitialCodeCacheSize < (uintx)os::vm_page_size()) {
|
2292 set_java_compiler(true); // "-Djava.compiler[=...]" most recently seen.
2293 }
2294 }
2295
2296 void Arguments::process_java_launcher_argument(const char* launcher, void* extra_info) {
2297 _sun_java_launcher = os::strdup_check_oom(launcher);
2298 }
2299
2300 bool Arguments::created_by_java_launcher() {
2301 assert(_sun_java_launcher != NULL, "property must have value");
2302 return strcmp(DEFAULT_JAVA_LAUNCHER, _sun_java_launcher) != 0;
2303 }
2304
2305 bool Arguments::sun_java_launcher_is_altjvm() {
2306 return _sun_java_launcher_is_altjvm;
2307 }
2308
2309 //===========================================================================================================
2310 // Parsing of main arguments
2311
2312 // Check consistency of JVMCI args
2313 #if INCLUDE_JVMCI
2314 bool Arguments::check_jvmci_flag_consistency() {
2315
2316 if (!EnableJVMCI && UseJVMCICompiler) {
2317 jio_fprintf(defaultStream::error_stream(), "EnableJVMCI must be enabled\n"
2318 "Improperly specified VM option 'UseJVMCICompiler'\n");
2319 return false;
2320 }
2321 return true;
2322 }
2323 #endif
2324
2325 // Check consistency of GC selection
2326 bool Arguments::check_gc_consistency() {
2327 // Ensure that the user has not selected conflicting sets
2328 // of collectors.
2329 uint i = 0;
2330 if (UseSerialGC) i++;
2331 if (UseConcMarkSweepGC) i++;
2332 if (UseParallelGC || UseParallelOldGC) i++;
2333 if (UseG1GC) i++;
2334 if (i > 1) {
2335 jio_fprintf(defaultStream::error_stream(),
2336 "Conflicting collector combinations in option list; "
2337 "please refer to the release notes for the combinations "
2338 "allowed\n");
2339 return false;
2340 }
2341
2342 if (UseConcMarkSweepGC && !UseParNewGC) {
2343 jio_fprintf(defaultStream::error_stream(),
2344 "It is not possible to combine the DefNew young collector with the CMS collector.\n");
2401 }
2402
2403 if (VerifyBeforeExit) {
2404 warning("Heap verification at shutdown disabled "
2405 "(due to current incompatibility with FLSVerifyAllHeapReferences)");
2406 VerifyBeforeExit = false; // Disable verification at shutdown
2407 }
2408 }
2409
2410 if (PrintNMTStatistics) {
2411 #if INCLUDE_NMT
2412 if (MemTracker::tracking_level() == NMT_off) {
2413 #endif // INCLUDE_NMT
2414 warning("PrintNMTStatistics is disabled, because native memory tracking is not enabled");
2415 PrintNMTStatistics = false;
2416 #if INCLUDE_NMT
2417 }
2418 #endif
2419 }
2420 #if INCLUDE_JVMCI
2421 status = status && check_jvmci_flag_consistency();
2422 if (EnableJVMCI) {
2423 if (!ScavengeRootsInCode) {
2424 warning("forcing ScavengeRootsInCode non-zero because JVMCI is enabled");
2425 ScavengeRootsInCode = 1;
2426 }
2427 if (FLAG_IS_DEFAULT(TypeProfileLevel)) {
2428 TypeProfileLevel = 0;
2429 }
2430 if (UseJVMCICompiler) {
2431 if (FLAG_IS_DEFAULT(TypeProfileWidth)) {
2432 TypeProfileWidth = 8;
2433 }
2434 }
2435 }
2436 #endif
2437
2438 // Check lower bounds of the code cache
2439 // Template Interpreter code is approximately 3X larger in debug builds.
2440 uint min_code_cache_size = CodeCacheMinimumUseSpace DEBUG_ONLY(* 3);
2441 if (InitialCodeCacheSize < (uintx)os::vm_page_size()) {
|