< prev index next >

src/share/vm/runtime/arguments.cpp

Print this page




2295     set_java_compiler(true);    // "-Djava.compiler[=...]" most recently seen.
2296   }
2297 }
2298 
2299 void Arguments::process_java_launcher_argument(const char* launcher, void* extra_info) {
2300   _sun_java_launcher = os::strdup_check_oom(launcher);
2301 }
2302 
2303 bool Arguments::created_by_java_launcher() {
2304   assert(_sun_java_launcher != NULL, "property must have value");
2305   return strcmp(DEFAULT_JAVA_LAUNCHER, _sun_java_launcher) != 0;
2306 }
2307 
2308 bool Arguments::sun_java_launcher_is_altjvm() {
2309   return _sun_java_launcher_is_altjvm;
2310 }
2311 
2312 //===========================================================================================================
2313 // Parsing of main arguments
2314 














2315 // Check consistency of GC selection
2316 bool Arguments::check_gc_consistency() {
2317   // Ensure that the user has not selected conflicting sets
2318   // of collectors.
2319   uint i = 0;
2320   if (UseSerialGC)                       i++;
2321   if (UseConcMarkSweepGC)                i++;
2322   if (UseParallelGC || UseParallelOldGC) i++;
2323   if (UseG1GC)                           i++;
2324   if (i > 1) {
2325     jio_fprintf(defaultStream::error_stream(),
2326                 "Conflicting collector combinations in option list; "
2327                 "please refer to the release notes for the combinations "
2328                 "allowed\n");
2329     return false;
2330   }
2331 
2332   if (UseConcMarkSweepGC && !UseParNewGC) {
2333     jio_fprintf(defaultStream::error_stream(),
2334         "It is not possible to combine the DefNew young collector with the CMS collector.\n");


2391     }
2392 
2393     if (VerifyBeforeExit) {
2394       warning("Heap verification at shutdown disabled "
2395               "(due to current incompatibility with FLSVerifyAllHeapReferences)");
2396       VerifyBeforeExit = false; // Disable verification at shutdown
2397     }
2398   }
2399 
2400   if (PrintNMTStatistics) {
2401 #if INCLUDE_NMT
2402     if (MemTracker::tracking_level() == NMT_off) {
2403 #endif // INCLUDE_NMT
2404       warning("PrintNMTStatistics is disabled, because native memory tracking is not enabled");
2405       PrintNMTStatistics = false;
2406 #if INCLUDE_NMT
2407     }
2408 #endif
2409   }
2410 #if INCLUDE_JVMCI



2411   if (EnableJVMCI) {
2412     if (!ScavengeRootsInCode) {
2413       warning("forcing ScavengeRootsInCode non-zero because JVMCI is enabled");
2414       ScavengeRootsInCode = 1;
2415     }
2416     if (FLAG_IS_DEFAULT(TypeProfileLevel)) {
2417       TypeProfileLevel = 0;
2418     }
2419     if (UseJVMCICompiler) {
2420       if (FLAG_IS_DEFAULT(TypeProfileWidth)) {
2421         TypeProfileWidth = 8;
2422       }
2423     }
2424   }
2425 #endif
2426 
2427   // Check lower bounds of the code cache
2428   // Template Interpreter code is approximately 3X larger in debug builds.
2429   uint min_code_cache_size = CodeCacheMinimumUseSpace DEBUG_ONLY(* 3);
2430   if (InitialCodeCacheSize < (uintx)os::vm_page_size()) {




2295     set_java_compiler(true);    // "-Djava.compiler[=...]" most recently seen.
2296   }
2297 }
2298 
2299 void Arguments::process_java_launcher_argument(const char* launcher, void* extra_info) {
2300   _sun_java_launcher = os::strdup_check_oom(launcher);
2301 }
2302 
2303 bool Arguments::created_by_java_launcher() {
2304   assert(_sun_java_launcher != NULL, "property must have value");
2305   return strcmp(DEFAULT_JAVA_LAUNCHER, _sun_java_launcher) != 0;
2306 }
2307 
2308 bool Arguments::sun_java_launcher_is_altjvm() {
2309   return _sun_java_launcher_is_altjvm;
2310 }
2311 
2312 //===========================================================================================================
2313 // Parsing of main arguments
2314 
2315 #if INCLUDE_JVMCI
2316 
2317 // Check consistency of jvmci vm argument settings.
2318 bool Arguments::check_jvmci_args_consistency() {
2319  
2320 
2321   if (!EnableJVMCI && is_any_jvmci_arg_values_changed()) { 
2322     print_jvmci_arg_inconsistency_error_message(); 
2323     return false;
2324   }
2325   return true;
2326 }
2327 #endif //INCLUDE_JVMCI
2328 
2329 // Check consistency of GC selection
2330 bool Arguments::check_gc_consistency() {
2331   // Ensure that the user has not selected conflicting sets
2332   // of collectors.
2333   uint i = 0;
2334   if (UseSerialGC)                       i++;
2335   if (UseConcMarkSweepGC)                i++;
2336   if (UseParallelGC || UseParallelOldGC) i++;
2337   if (UseG1GC)                           i++;
2338   if (i > 1) {
2339     jio_fprintf(defaultStream::error_stream(),
2340                 "Conflicting collector combinations in option list; "
2341                 "please refer to the release notes for the combinations "
2342                 "allowed\n");
2343     return false;
2344   }
2345 
2346   if (UseConcMarkSweepGC && !UseParNewGC) {
2347     jio_fprintf(defaultStream::error_stream(),
2348         "It is not possible to combine the DefNew young collector with the CMS collector.\n");


2405     }
2406 
2407     if (VerifyBeforeExit) {
2408       warning("Heap verification at shutdown disabled "
2409               "(due to current incompatibility with FLSVerifyAllHeapReferences)");
2410       VerifyBeforeExit = false; // Disable verification at shutdown
2411     }
2412   }
2413 
2414   if (PrintNMTStatistics) {
2415 #if INCLUDE_NMT
2416     if (MemTracker::tracking_level() == NMT_off) {
2417 #endif // INCLUDE_NMT
2418       warning("PrintNMTStatistics is disabled, because native memory tracking is not enabled");
2419       PrintNMTStatistics = false;
2420 #if INCLUDE_NMT
2421     }
2422 #endif
2423   }
2424 #if INCLUDE_JVMCI
2425 
2426   status = status && check_jvmci_args_consistency();
2427 
2428   if (EnableJVMCI) {
2429     if (!ScavengeRootsInCode) {
2430       warning("forcing ScavengeRootsInCode non-zero because JVMCI is enabled");
2431       ScavengeRootsInCode = 1;
2432     }
2433     if (FLAG_IS_DEFAULT(TypeProfileLevel)) {
2434       TypeProfileLevel = 0;
2435     }
2436     if (UseJVMCICompiler) {
2437       if (FLAG_IS_DEFAULT(TypeProfileWidth)) {
2438         TypeProfileWidth = 8;
2439       }
2440     }
2441   }
2442 #endif
2443 
2444   // Check lower bounds of the code cache
2445   // Template Interpreter code is approximately 3X larger in debug builds.
2446   uint min_code_cache_size = CodeCacheMinimumUseSpace DEBUG_ONLY(* 3);
2447   if (InitialCodeCacheSize < (uintx)os::vm_page_size()) {


< prev index next >