1766 // set is selected; however what the user gets is not what they
1767 // may have expected from the combination they asked for. It's
1768 // better to reduce user confusion by not allowing them to
1769 // select conflicting combinations.
1770 uint i = 0;
1771 if (UseSerialGC) i++;
1772 if (UseConcMarkSweepGC || UseParNewGC) i++;
1773 if (UseParallelGC || UseParallelOldGC) i++;
1774 if (UseG1GC) i++;
1775 if (i > 1) {
1776 jio_fprintf(defaultStream::error_stream(),
1777 "Conflicting collector combinations in option list; "
1778 "please refer to the release notes for the combinations "
1779 "allowed\n");
1780 status = false;
1781 }
1782
1783 return status;
1784 }
1785
1786 // Check stack pages settings
1787 bool Arguments::check_stack_pages()
1788 {
1789 bool status = true;
1790 status = status && verify_min_value(StackYellowPages, 1, "StackYellowPages");
1791 status = status && verify_min_value(StackRedPages, 1, "StackRedPages");
1792 // greater stack shadow pages can't generate instruction to bang stack
1793 status = status && verify_interval(StackShadowPages, 1, 50, "StackShadowPages");
1794 return status;
1795 }
1796
1797 // Check the consistency of vm_init_args
1798 bool Arguments::check_vm_args_consistency() {
1799 // Method for adding checks for flag consistency.
1800 // The intent is to warn the user of all possible conflicts,
1801 // before returning an error.
1802 // Note: Needs platform-dependent factoring.
1803 bool status = true;
1804
1805 #if ( (defined(COMPILER2) && defined(SPARC)))
3230 if (CompilationPolicyChoice >= 2) {
3231 vm_exit_during_initialization(
3232 "Incompatible compilation policy selected", NULL);
3233 }
3234 }
3235
3236 // Set heap size based on available physical memory
3237 set_heap_size();
3238
3239 #if INCLUDE_ALTERNATE_GCS
3240 // Set per-collector flags
3241 if (UseParallelGC || UseParallelOldGC) {
3242 set_parallel_gc_flags();
3243 } else if (UseConcMarkSweepGC) { // should be done before ParNew check below
3244 set_cms_and_parnew_gc_flags();
3245 } else if (UseParNewGC) { // skipped if CMS is set above
3246 set_parnew_gc_flags();
3247 } else if (UseG1GC) {
3248 set_g1_gc_flags();
3249 }
3250 #endif // INCLUDE_ALTERNATE_GCS
3251
3252 #ifdef SERIALGC
3253 assert(verify_serial_gc_flags(), "SerialGC unset");
3254 #endif // SERIALGC
3255
3256 // Set bytecode rewriting flags
3257 set_bytecode_flags();
3258
3259 // Set flags if Aggressive optimization flags (-XX:+AggressiveOpts) enabled.
3260 set_aggressive_opts_flags();
3261
3262 // Turn off biased locking for locking debug mode flags,
3263 // which are subtlely different from each other but neither works with
3264 // biased locking.
3265 if (UseHeavyMonitors
3266 #ifdef COMPILER1
3267 || !UseFastLocking
3268 #endif // COMPILER1
3269 ) {
|
1766 // set is selected; however what the user gets is not what they
1767 // may have expected from the combination they asked for. It's
1768 // better to reduce user confusion by not allowing them to
1769 // select conflicting combinations.
1770 uint i = 0;
1771 if (UseSerialGC) i++;
1772 if (UseConcMarkSweepGC || UseParNewGC) i++;
1773 if (UseParallelGC || UseParallelOldGC) i++;
1774 if (UseG1GC) i++;
1775 if (i > 1) {
1776 jio_fprintf(defaultStream::error_stream(),
1777 "Conflicting collector combinations in option list; "
1778 "please refer to the release notes for the combinations "
1779 "allowed\n");
1780 status = false;
1781 }
1782
1783 return status;
1784 }
1785
1786 void Arguments::check_deprecated_gcs() {
1787 if (UseConcMarkSweepGC && !UseParNewGC) {
1788 warning("Using the DefNew young collector with the CMS collector is deprecated "
1789 "and will likely be removed in a future release");
1790 }
1791
1792 if (UseParNewGC && !UseConcMarkSweepGC) {
1793 // !UseConcMarkSweepGC means that we are using serial old gc. Unfortunately we don't
1794 // set up UseSerialGC properly, so that can't be used in the check here.
1795 warning("Using the ParNew young collector with the Serial old collector is deprecated "
1796 "and will likely be removed in a future release");
1797 }
1798 }
1799
1800 // Check stack pages settings
1801 bool Arguments::check_stack_pages()
1802 {
1803 bool status = true;
1804 status = status && verify_min_value(StackYellowPages, 1, "StackYellowPages");
1805 status = status && verify_min_value(StackRedPages, 1, "StackRedPages");
1806 // greater stack shadow pages can't generate instruction to bang stack
1807 status = status && verify_interval(StackShadowPages, 1, 50, "StackShadowPages");
1808 return status;
1809 }
1810
1811 // Check the consistency of vm_init_args
1812 bool Arguments::check_vm_args_consistency() {
1813 // Method for adding checks for flag consistency.
1814 // The intent is to warn the user of all possible conflicts,
1815 // before returning an error.
1816 // Note: Needs platform-dependent factoring.
1817 bool status = true;
1818
1819 #if ( (defined(COMPILER2) && defined(SPARC)))
3244 if (CompilationPolicyChoice >= 2) {
3245 vm_exit_during_initialization(
3246 "Incompatible compilation policy selected", NULL);
3247 }
3248 }
3249
3250 // Set heap size based on available physical memory
3251 set_heap_size();
3252
3253 #if INCLUDE_ALTERNATE_GCS
3254 // Set per-collector flags
3255 if (UseParallelGC || UseParallelOldGC) {
3256 set_parallel_gc_flags();
3257 } else if (UseConcMarkSweepGC) { // should be done before ParNew check below
3258 set_cms_and_parnew_gc_flags();
3259 } else if (UseParNewGC) { // skipped if CMS is set above
3260 set_parnew_gc_flags();
3261 } else if (UseG1GC) {
3262 set_g1_gc_flags();
3263 }
3264 check_deprecated_gcs();
3265 #endif // INCLUDE_ALTERNATE_GCS
3266
3267 #ifdef SERIALGC
3268 assert(verify_serial_gc_flags(), "SerialGC unset");
3269 #endif // SERIALGC
3270
3271 // Set bytecode rewriting flags
3272 set_bytecode_flags();
3273
3274 // Set flags if Aggressive optimization flags (-XX:+AggressiveOpts) enabled.
3275 set_aggressive_opts_flags();
3276
3277 // Turn off biased locking for locking debug mode flags,
3278 // which are subtlely different from each other but neither works with
3279 // biased locking.
3280 if (UseHeavyMonitors
3281 #ifdef COMPILER1
3282 || !UseFastLocking
3283 #endif // COMPILER1
3284 ) {
|