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 }
1790
1791 if (UseParNewGC && !UseConcMarkSweepGC) {
1792 // !UseConcMarkSweepGC means that we are using serial old gc. Unfortunately we don't
1793 // set up UseSerialGC properly, so that can't be used in the check here.
1794 warning("Using the ParNew young collector with the Serial old collector is deprecated");
1795 }
1796 }
1797
1798 // Check stack pages settings
1799 bool Arguments::check_stack_pages()
1800 {
1801 bool status = true;
1802 status = status && verify_min_value(StackYellowPages, 1, "StackYellowPages");
1803 status = status && verify_min_value(StackRedPages, 1, "StackRedPages");
1804 // greater stack shadow pages can't generate instruction to bang stack
1805 status = status && verify_interval(StackShadowPages, 1, 50, "StackShadowPages");
1806 return status;
1807 }
1808
1809 // Check the consistency of vm_init_args
1810 bool Arguments::check_vm_args_consistency() {
1811 // Method for adding checks for flag consistency.
1812 // The intent is to warn the user of all possible conflicts,
1813 // before returning an error.
1814 // Note: Needs platform-dependent factoring.
1815 bool status = true;
1816
1817 #if ( (defined(COMPILER2) && defined(SPARC)))
3242 if (CompilationPolicyChoice >= 2) {
3243 vm_exit_during_initialization(
3244 "Incompatible compilation policy selected", NULL);
3245 }
3246 }
3247
3248 // Set heap size based on available physical memory
3249 set_heap_size();
3250
3251 #if INCLUDE_ALTERNATE_GCS
3252 // Set per-collector flags
3253 if (UseParallelGC || UseParallelOldGC) {
3254 set_parallel_gc_flags();
3255 } else if (UseConcMarkSweepGC) { // should be done before ParNew check below
3256 set_cms_and_parnew_gc_flags();
3257 } else if (UseParNewGC) { // skipped if CMS is set above
3258 set_parnew_gc_flags();
3259 } else if (UseG1GC) {
3260 set_g1_gc_flags();
3261 }
3262 check_deprecated_gcs();
3263 #endif // INCLUDE_ALTERNATE_GCS
3264
3265 #ifdef SERIALGC
3266 assert(verify_serial_gc_flags(), "SerialGC unset");
3267 #endif // SERIALGC
3268
3269 // Set bytecode rewriting flags
3270 set_bytecode_flags();
3271
3272 // Set flags if Aggressive optimization flags (-XX:+AggressiveOpts) enabled.
3273 set_aggressive_opts_flags();
3274
3275 // Turn off biased locking for locking debug mode flags,
3276 // which are subtlely different from each other but neither works with
3277 // biased locking.
3278 if (UseHeavyMonitors
3279 #ifdef COMPILER1
3280 || !UseFastLocking
3281 #endif // COMPILER1
3282 ) {
|