src/share/vm/runtime/arguments.cpp

Print this page




1788   // set is selected; however what the user gets is not what they
1789   // may have expected from the combination they asked for. It's
1790   // better to reduce user confusion by not allowing them to
1791   // select conflicting combinations.
1792   uint i = 0;
1793   if (UseSerialGC)                       i++;
1794   if (UseConcMarkSweepGC || UseParNewGC) i++;
1795   if (UseParallelGC || UseParallelOldGC) i++;
1796   if (UseG1GC)                           i++;
1797   if (i > 1) {
1798     jio_fprintf(defaultStream::error_stream(),
1799                 "Conflicting collector combinations in option list; "
1800                 "please refer to the release notes for the combinations "
1801                 "allowed\n");
1802     status = false;
1803   }
1804 
1805   return status;
1806 }
1807 







1808 void Arguments::check_deprecated_gcs() {
1809   if (UseConcMarkSweepGC && !UseParNewGC) {
1810     warning("Using the DefNew young collector with the CMS collector is deprecated "
1811         "and will likely be removed in a future release");
1812   }
1813 
1814   if (UseParNewGC && !UseConcMarkSweepGC) {
1815     // !UseConcMarkSweepGC means that we are using serial old gc. Unfortunately we don't
1816     // set up UseSerialGC properly, so that can't be used in the check here.
1817     warning("Using the ParNew young collector with the Serial old collector is deprecated "
1818         "and will likely be removed in a future release");
1819   }
1820 
1821   if (CMSIncrementalMode) {
1822     warning("Using incremental CMS is deprecated and will likely be removed in a future release");
1823   }
1824 }
1825 
1826 // Check stack pages settings
1827 bool Arguments::check_stack_pages()


3279     if (CompilationPolicyChoice >= 2) {
3280       vm_exit_during_initialization(
3281         "Incompatible compilation policy selected", NULL);
3282     }
3283   }
3284 
3285   // Set heap size based on available physical memory
3286   set_heap_size();
3287 
3288 #if INCLUDE_ALL_GCS
3289   // Set per-collector flags
3290   if (UseParallelGC || UseParallelOldGC) {
3291     set_parallel_gc_flags();
3292   } else if (UseConcMarkSweepGC) { // should be done before ParNew check below
3293     set_cms_and_parnew_gc_flags();
3294   } else if (UseParNewGC) {  // skipped if CMS is set above
3295     set_parnew_gc_flags();
3296   } else if (UseG1GC) {
3297     set_g1_gc_flags();
3298   }

3299   check_deprecated_gcs();
3300 #else // INCLUDE_ALL_GCS
3301   assert(verify_serial_gc_flags(), "SerialGC unset");
3302 #endif // INCLUDE_ALL_GCS
3303 
3304   // Set bytecode rewriting flags
3305   set_bytecode_flags();
3306 
3307   // Set flags if Aggressive optimization flags (-XX:+AggressiveOpts) enabled.
3308   set_aggressive_opts_flags();
3309 
3310   // Turn off biased locking for locking debug mode flags,
3311   // which are subtlely different from each other but neither works with
3312   // biased locking.
3313   if (UseHeavyMonitors
3314 #ifdef COMPILER1
3315       || !UseFastLocking
3316 #endif // COMPILER1
3317     ) {
3318     if (!FLAG_IS_DEFAULT(UseBiasedLocking) && UseBiasedLocking) {




1788   // set is selected; however what the user gets is not what they
1789   // may have expected from the combination they asked for. It's
1790   // better to reduce user confusion by not allowing them to
1791   // select conflicting combinations.
1792   uint i = 0;
1793   if (UseSerialGC)                       i++;
1794   if (UseConcMarkSweepGC || UseParNewGC) i++;
1795   if (UseParallelGC || UseParallelOldGC) i++;
1796   if (UseG1GC)                           i++;
1797   if (i > 1) {
1798     jio_fprintf(defaultStream::error_stream(),
1799                 "Conflicting collector combinations in option list; "
1800                 "please refer to the release notes for the combinations "
1801                 "allowed\n");
1802     status = false;
1803   }
1804 
1805   return status;
1806 }
1807 
1808 void Arguments::check_gc_flags() {
1809   if (FLAG_IS_CMDLINE(MaxGCMinorPauseMillis)) {
1810     warning("Using MaxGCMinorPauseMillis as minor pause goal is deprecated"
1811             "and will likely be removed in future release");
1812   }
1813 }
1814 
1815 void Arguments::check_deprecated_gcs() {
1816   if (UseConcMarkSweepGC && !UseParNewGC) {
1817     warning("Using the DefNew young collector with the CMS collector is deprecated "
1818         "and will likely be removed in a future release");
1819   }
1820 
1821   if (UseParNewGC && !UseConcMarkSweepGC) {
1822     // !UseConcMarkSweepGC means that we are using serial old gc. Unfortunately we don't
1823     // set up UseSerialGC properly, so that can't be used in the check here.
1824     warning("Using the ParNew young collector with the Serial old collector is deprecated "
1825         "and will likely be removed in a future release");
1826   }
1827 
1828   if (CMSIncrementalMode) {
1829     warning("Using incremental CMS is deprecated and will likely be removed in a future release");
1830   }
1831 }
1832 
1833 // Check stack pages settings
1834 bool Arguments::check_stack_pages()


3286     if (CompilationPolicyChoice >= 2) {
3287       vm_exit_during_initialization(
3288         "Incompatible compilation policy selected", NULL);
3289     }
3290   }
3291 
3292   // Set heap size based on available physical memory
3293   set_heap_size();
3294 
3295 #if INCLUDE_ALL_GCS
3296   // Set per-collector flags
3297   if (UseParallelGC || UseParallelOldGC) {
3298     set_parallel_gc_flags();
3299   } else if (UseConcMarkSweepGC) { // should be done before ParNew check below
3300     set_cms_and_parnew_gc_flags();
3301   } else if (UseParNewGC) {  // skipped if CMS is set above
3302     set_parnew_gc_flags();
3303   } else if (UseG1GC) {
3304     set_g1_gc_flags();
3305   }
3306   check_gc_flags();
3307   check_deprecated_gcs();
3308 #else // INCLUDE_ALL_GCS
3309   assert(verify_serial_gc_flags(), "SerialGC unset");
3310 #endif // INCLUDE_ALL_GCS
3311 
3312   // Set bytecode rewriting flags
3313   set_bytecode_flags();
3314 
3315   // Set flags if Aggressive optimization flags (-XX:+AggressiveOpts) enabled.
3316   set_aggressive_opts_flags();
3317 
3318   // Turn off biased locking for locking debug mode flags,
3319   // which are subtlely different from each other but neither works with
3320   // biased locking.
3321   if (UseHeavyMonitors
3322 #ifdef COMPILER1
3323       || !UseFastLocking
3324 #endif // COMPILER1
3325     ) {
3326     if (!FLAG_IS_DEFAULT(UseBiasedLocking) && UseBiasedLocking) {