< prev index next >

src/share/vm/runtime/arguments.cpp

Print this page




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


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


< prev index next >