src/share/vm/runtime/arguments.cpp

Print this page




2382     status = false;
2383   } else if (ReservedCodeCacheSize < min_code_cache_size) {
2384     jio_fprintf(defaultStream::error_stream(),
2385                 "Invalid ReservedCodeCacheSize=%dK. Must be at least %uK.\n", ReservedCodeCacheSize/K,
2386                 min_code_cache_size/K);
2387     status = false;
2388   } else if (ReservedCodeCacheSize > 2*G) {
2389     // Code cache size larger than MAXINT is not supported.
2390     jio_fprintf(defaultStream::error_stream(),
2391                 "Invalid ReservedCodeCacheSize=%dM. Must be at most %uM.\n", ReservedCodeCacheSize/M,
2392                 (2*G)/M);
2393     status = false;
2394   }
2395 
2396   status &= verify_interval(NmethodSweepFraction, 1, ReservedCodeCacheSize/K, "NmethodSweepFraction");
2397   status &= verify_interval(NmethodSweepActivity, 0, 2000, "NmethodSweepActivity");
2398   status &= verify_interval(CodeCacheMinBlockLength, 1, 100, "CodeCacheMinBlockLength");
2399   status &= verify_interval(CodeCacheSegmentSize, 1, 1024, "CodeCacheSegmentSize");
2400 
2401   // TieredCompilation needs at least 2 compiler threads.
2402   const int num_min_compiler_threads = (TieredCompilation && (TieredStopAtLevel >= CompLevel_full_optimization)) ? 2 : 1;
2403   status &=verify_min_value(CICompilerCount, num_min_compiler_threads, "CICompilerCount");
2404 
2405   if (!FLAG_IS_DEFAULT(CICompilerCount) && !FLAG_IS_DEFAULT(CICompilerCountPerCPU) && CICompilerCountPerCPU) {
2406     warning("The VM option CICompilerCountPerCPU overrides CICompilerCount.");
2407   }
2408 
2409   return status;
2410 }
2411 
2412 bool Arguments::is_bad_option(const JavaVMOption* option, jboolean ignore,
2413   const char* option_type) {
2414   if (ignore) return false;
2415 
2416   const char* spacer = " ";
2417   if (option_type == NULL) {
2418     option_type = ++spacer; // Set both to the empty string.
2419   }
2420 
2421   if (os::obsolete_option(option)) {
2422     jio_fprintf(defaultStream::error_stream(),




2382     status = false;
2383   } else if (ReservedCodeCacheSize < min_code_cache_size) {
2384     jio_fprintf(defaultStream::error_stream(),
2385                 "Invalid ReservedCodeCacheSize=%dK. Must be at least %uK.\n", ReservedCodeCacheSize/K,
2386                 min_code_cache_size/K);
2387     status = false;
2388   } else if (ReservedCodeCacheSize > 2*G) {
2389     // Code cache size larger than MAXINT is not supported.
2390     jio_fprintf(defaultStream::error_stream(),
2391                 "Invalid ReservedCodeCacheSize=%dM. Must be at most %uM.\n", ReservedCodeCacheSize/M,
2392                 (2*G)/M);
2393     status = false;
2394   }
2395 
2396   status &= verify_interval(NmethodSweepFraction, 1, ReservedCodeCacheSize/K, "NmethodSweepFraction");
2397   status &= verify_interval(NmethodSweepActivity, 0, 2000, "NmethodSweepActivity");
2398   status &= verify_interval(CodeCacheMinBlockLength, 1, 100, "CodeCacheMinBlockLength");
2399   status &= verify_interval(CodeCacheSegmentSize, 1, 1024, "CodeCacheSegmentSize");
2400 
2401   // TieredCompilation needs at least 2 compiler threads.
2402   const int num_min_compiler_threads = (TieredCompilation && (TieredStopAtLevel >= CompLevel_full_optimization)) ? 2 : CI_COMPILER_COUNT;
2403   status &=verify_min_value(CICompilerCount, num_min_compiler_threads, "CICompilerCount");
2404 
2405   if (!FLAG_IS_DEFAULT(CICompilerCount) && !FLAG_IS_DEFAULT(CICompilerCountPerCPU) && CICompilerCountPerCPU) {
2406     warning("The VM option CICompilerCountPerCPU overrides CICompilerCount.");
2407   }
2408 
2409   return status;
2410 }
2411 
2412 bool Arguments::is_bad_option(const JavaVMOption* option, jboolean ignore,
2413   const char* option_type) {
2414   if (ignore) return false;
2415 
2416   const char* spacer = " ";
2417   if (option_type == NULL) {
2418     option_type = ++spacer; // Set both to the empty string.
2419   }
2420 
2421   if (os::obsolete_option(option)) {
2422     jio_fprintf(defaultStream::error_stream(),