src/share/vm/runtime/arguments.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File c1-coops Sdiff src/share/vm/runtime

src/share/vm/runtime/arguments.cpp

Print this page




 943     break;
 944   }
 945 }
 946 
 947 // Conflict: required to use shared spaces (-Xshare:on), but
 948 // incompatible command line options were chosen.
 949 
 950 static void no_shared_spaces() {
 951   if (RequireSharedSpaces) {
 952     jio_fprintf(defaultStream::error_stream(),
 953       "Class data sharing is inconsistent with other specified options.\n");
 954     vm_exit_during_initialization("Unable to use shared archive.", NULL);
 955   } else {
 956     FLAG_SET_DEFAULT(UseSharedSpaces, false);
 957   }
 958 }
 959 
 960 void Arguments::check_compressed_oops_compat() {
 961 #ifdef _LP64
 962   assert(UseCompressedOops, "Precondition");
 963 #  if defined(COMPILER1) && !defined(TIERED)
 964   // Until c1 supports compressed oops turn them off.
 965   FLAG_SET_DEFAULT(UseCompressedOops, false);
 966 #  else
 967   // Is it on by default or set on ergonomically
 968   bool is_on_by_default = FLAG_IS_DEFAULT(UseCompressedOops) || FLAG_IS_ERGO(UseCompressedOops);
 969 
 970   // Tiered currently doesn't work with compressed oops
 971   if (TieredCompilation) {
 972     if (is_on_by_default) {
 973       FLAG_SET_DEFAULT(UseCompressedOops, false);
 974       return;
 975     } else {
 976       vm_exit_during_initialization(
 977         "Tiered compilation is not supported with compressed oops yet", NULL);
 978     }
 979   }
 980 
 981   // If dumping an archive or forcing its use, disable compressed oops if possible
 982   if (DumpSharedSpaces || RequireSharedSpaces) {
 983     if (is_on_by_default) {
 984       FLAG_SET_DEFAULT(UseCompressedOops, false);
 985       return;
 986     } else {
 987       vm_exit_during_initialization(
 988         "Class Data Sharing is not supported with compressed oops yet", NULL);
 989     }
 990   } else if (UseSharedSpaces) {
 991     // UseSharedSpaces is on by default. With compressed oops, we turn it off.
 992     FLAG_SET_DEFAULT(UseSharedSpaces, false);
 993   }
 994 
 995 #  endif // defined(COMPILER1) && !defined(TIERED)
 996 #endif // _LP64
 997 }
 998 
 999 void Arguments::set_tiered_flags() {
1000   if (FLAG_IS_DEFAULT(CompilationPolicyChoice)) {
1001     FLAG_SET_DEFAULT(CompilationPolicyChoice, 2);
1002   }
1003   if (CompilationPolicyChoice < 2) {
1004     vm_exit_during_initialization(
1005       "Incompatible compilation policy selected", NULL);
1006   }
1007   // Increase the code cache size - tiered compiles a lot more.
1008   if (FLAG_IS_DEFAULT(ReservedCodeCacheSize)) {
1009     FLAG_SET_DEFAULT(ReservedCodeCacheSize, ReservedCodeCacheSize * 2);
1010   }
1011 }
1012 
1013 #ifndef KERNEL
1014 // If the user has chosen ParallelGCThreads > 0, we set UseParNewGC
1015 // if it's not explictly set or unset. If the user has chosen




 943     break;
 944   }
 945 }
 946 
 947 // Conflict: required to use shared spaces (-Xshare:on), but
 948 // incompatible command line options were chosen.
 949 
 950 static void no_shared_spaces() {
 951   if (RequireSharedSpaces) {
 952     jio_fprintf(defaultStream::error_stream(),
 953       "Class data sharing is inconsistent with other specified options.\n");
 954     vm_exit_during_initialization("Unable to use shared archive.", NULL);
 955   } else {
 956     FLAG_SET_DEFAULT(UseSharedSpaces, false);
 957   }
 958 }
 959 
 960 void Arguments::check_compressed_oops_compat() {
 961 #ifdef _LP64
 962   assert(UseCompressedOops, "Precondition");




 963   // Is it on by default or set on ergonomically
 964   bool is_on_by_default = FLAG_IS_DEFAULT(UseCompressedOops) || FLAG_IS_ERGO(UseCompressedOops);
 965 











 966   // If dumping an archive or forcing its use, disable compressed oops if possible
 967   if (DumpSharedSpaces || RequireSharedSpaces) {
 968     if (is_on_by_default) {
 969       FLAG_SET_DEFAULT(UseCompressedOops, false);
 970       return;
 971     } else {
 972       vm_exit_during_initialization(
 973         "Class Data Sharing is not supported with compressed oops yet", NULL);
 974     }
 975   } else if (UseSharedSpaces) {
 976     // UseSharedSpaces is on by default. With compressed oops, we turn it off.
 977     FLAG_SET_DEFAULT(UseSharedSpaces, false);
 978   }


 979 #endif // _LP64
 980 }
 981 
 982 void Arguments::set_tiered_flags() {
 983   if (FLAG_IS_DEFAULT(CompilationPolicyChoice)) {
 984     FLAG_SET_DEFAULT(CompilationPolicyChoice, 2);
 985   }
 986   if (CompilationPolicyChoice < 2) {
 987     vm_exit_during_initialization(
 988       "Incompatible compilation policy selected", NULL);
 989   }
 990   // Increase the code cache size - tiered compiles a lot more.
 991   if (FLAG_IS_DEFAULT(ReservedCodeCacheSize)) {
 992     FLAG_SET_DEFAULT(ReservedCodeCacheSize, ReservedCodeCacheSize * 2);
 993   }
 994 }
 995 
 996 #ifndef KERNEL
 997 // If the user has chosen ParallelGCThreads > 0, we set UseParNewGC
 998 // if it's not explictly set or unset. If the user has chosen


src/share/vm/runtime/arguments.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File