Mercurial > hg > truffle
comparison src/share/vm/runtime/arguments.cpp @ 1957:9752a6549f2e
Merge
author | zgu |
---|---|
date | Fri, 12 Nov 2010 09:37:13 -0500 |
parents | 35f885165c69 2db84614f61d |
children | 4110c3e0c50d |
comparison
equal
deleted
inserted
replaced
1956:35f885165c69 | 1957:9752a6549f2e |
---|---|
201 { "DefaultMaxRAM", JDK_Version::jdk_update(6,18), JDK_Version::jdk(7) }, | 201 { "DefaultMaxRAM", JDK_Version::jdk_update(6,18), JDK_Version::jdk(7) }, |
202 { "DefaultInitialRAMFraction", | 202 { "DefaultInitialRAMFraction", |
203 JDK_Version::jdk_update(6,18), JDK_Version::jdk(7) }, | 203 JDK_Version::jdk_update(6,18), JDK_Version::jdk(7) }, |
204 { "UseDepthFirstScavengeOrder", | 204 { "UseDepthFirstScavengeOrder", |
205 JDK_Version::jdk_update(6,22), JDK_Version::jdk(7) }, | 205 JDK_Version::jdk_update(6,22), JDK_Version::jdk(7) }, |
206 { "HandlePromotionFailure", | |
207 JDK_Version::jdk_update(6,24), JDK_Version::jdk(8) }, | |
208 { "MaxLiveObjectEvacuationRatio", | |
209 JDK_Version::jdk_update(6,24), JDK_Version::jdk(8) }, | |
206 { NULL, JDK_Version(0), JDK_Version(0) } | 210 { NULL, JDK_Version(0), JDK_Version(0) } |
207 }; | 211 }; |
208 | 212 |
209 // Returns true if the flag is obsolete and fits into the range specified | 213 // Returns true if the flag is obsolete and fits into the range specified |
210 // for being ignored. In the case that the flag is ignored, the 'version' | 214 // for being ignored. In the case that the flag is ignored, the 'version' |
964 } else { | 968 } else { |
965 FLAG_SET_DEFAULT(UseSharedSpaces, false); | 969 FLAG_SET_DEFAULT(UseSharedSpaces, false); |
966 } | 970 } |
967 } | 971 } |
968 | 972 |
973 void Arguments::check_compressed_oops_compat() { | |
974 #ifdef _LP64 | |
975 assert(UseCompressedOops, "Precondition"); | |
976 # if defined(COMPILER1) && !defined(TIERED) | |
977 // Until c1 supports compressed oops turn them off. | |
978 FLAG_SET_DEFAULT(UseCompressedOops, false); | |
979 # else | |
980 // Is it on by default or set on ergonomically | |
981 bool is_on_by_default = FLAG_IS_DEFAULT(UseCompressedOops) || FLAG_IS_ERGO(UseCompressedOops); | |
982 | |
983 // Tiered currently doesn't work with compressed oops | |
984 if (TieredCompilation) { | |
985 if (is_on_by_default) { | |
986 FLAG_SET_DEFAULT(UseCompressedOops, false); | |
987 return; | |
988 } else { | |
989 vm_exit_during_initialization( | |
990 "Tiered compilation is not supported with compressed oops yet", NULL); | |
991 } | |
992 } | |
993 | |
994 // If dumping an archive or forcing its use, disable compressed oops if possible | |
995 if (DumpSharedSpaces || RequireSharedSpaces) { | |
996 if (is_on_by_default) { | |
997 FLAG_SET_DEFAULT(UseCompressedOops, false); | |
998 return; | |
999 } else { | |
1000 vm_exit_during_initialization( | |
1001 "Class Data Sharing is not supported with compressed oops yet", NULL); | |
1002 } | |
1003 } else if (UseSharedSpaces) { | |
1004 // UseSharedSpaces is on by default. With compressed oops, we turn it off. | |
1005 FLAG_SET_DEFAULT(UseSharedSpaces, false); | |
1006 } | |
1007 | |
1008 # endif // defined(COMPILER1) && !defined(TIERED) | |
1009 #endif // _LP64 | |
1010 } | |
1011 | |
969 void Arguments::set_tiered_flags() { | 1012 void Arguments::set_tiered_flags() { |
970 if (FLAG_IS_DEFAULT(CompilationPolicyChoice)) { | 1013 if (FLAG_IS_DEFAULT(CompilationPolicyChoice)) { |
971 FLAG_SET_DEFAULT(CompilationPolicyChoice, 2); | 1014 FLAG_SET_DEFAULT(CompilationPolicyChoice, 2); |
972 } | 1015 } |
973 | |
974 if (CompilationPolicyChoice < 2) { | 1016 if (CompilationPolicyChoice < 2) { |
975 vm_exit_during_initialization( | 1017 vm_exit_during_initialization( |
976 "Incompatible compilation policy selected", NULL); | 1018 "Incompatible compilation policy selected", NULL); |
977 } | 1019 } |
978 | 1020 // Increase the code cache size - tiered compiles a lot more. |
979 #ifdef _LP64 | |
980 if (FLAG_IS_DEFAULT(UseCompressedOops) || FLAG_IS_ERGO(UseCompressedOops)) { | |
981 UseCompressedOops = false; | |
982 } | |
983 if (UseCompressedOops) { | |
984 vm_exit_during_initialization( | |
985 "Tiered compilation is not supported with compressed oops yet", NULL); | |
986 } | |
987 #endif | |
988 // Increase the code cache size - tiered compiles a lot more. | |
989 if (FLAG_IS_DEFAULT(ReservedCodeCacheSize)) { | 1021 if (FLAG_IS_DEFAULT(ReservedCodeCacheSize)) { |
990 FLAG_SET_DEFAULT(ReservedCodeCacheSize, ReservedCodeCacheSize * 2); | 1022 FLAG_SET_DEFAULT(ReservedCodeCacheSize, ReservedCodeCacheSize * 2); |
991 } | 1023 } |
992 } | 1024 } |
993 | 1025 |
1739 "not " SIZE_FORMAT "\n", | 1771 "not " SIZE_FORMAT "\n", |
1740 TLABRefillWasteFraction); | 1772 TLABRefillWasteFraction); |
1741 status = false; | 1773 status = false; |
1742 } | 1774 } |
1743 | 1775 |
1744 status = status && verify_percentage(MaxLiveObjectEvacuationRatio, | |
1745 "MaxLiveObjectEvacuationRatio"); | |
1746 status = status && verify_percentage(AdaptiveSizePolicyWeight, | 1776 status = status && verify_percentage(AdaptiveSizePolicyWeight, |
1747 "AdaptiveSizePolicyWeight"); | 1777 "AdaptiveSizePolicyWeight"); |
1748 status = status && verify_percentage(AdaptivePermSizeWeight, "AdaptivePermSizeWeight"); | 1778 status = status && verify_percentage(AdaptivePermSizeWeight, "AdaptivePermSizeWeight"); |
1749 status = status && verify_percentage(ThresholdTolerance, "ThresholdTolerance"); | 1779 status = status && verify_percentage(ThresholdTolerance, "ThresholdTolerance"); |
1750 status = status && verify_percentage(MinHeapFreeRatio, "MinHeapFreeRatio"); | 1780 status = status && verify_percentage(MinHeapFreeRatio, "MinHeapFreeRatio"); |
2844 return(parse_each_vm_init_arg(&vm_args, scp_p, scp_assembly_required_p, ENVIRON_VAR)); | 2874 return(parse_each_vm_init_arg(&vm_args, scp_p, scp_assembly_required_p, ENVIRON_VAR)); |
2845 } | 2875 } |
2846 return JNI_OK; | 2876 return JNI_OK; |
2847 } | 2877 } |
2848 | 2878 |
2879 | |
2849 // Parse entry point called from JNI_CreateJavaVM | 2880 // Parse entry point called from JNI_CreateJavaVM |
2850 | 2881 |
2851 jint Arguments::parse(const JavaVMInitArgs* args) { | 2882 jint Arguments::parse(const JavaVMInitArgs* args) { |
2852 | 2883 |
2853 // Sharing support | 2884 // Sharing support |
2986 if (PrintGCDetails) { | 3017 if (PrintGCDetails) { |
2987 // Turn on -verbose:gc options as well | 3018 // Turn on -verbose:gc options as well |
2988 PrintGC = true; | 3019 PrintGC = true; |
2989 } | 3020 } |
2990 | 3021 |
2991 #if defined(_LP64) && defined(COMPILER1) && !defined(TIERED) | |
2992 UseCompressedOops = false; | |
2993 #endif | |
2994 | |
2995 #if defined(_LP64) | |
2996 if ((DumpSharedSpaces || RequireSharedSpaces) && UseCompressedOops) { | |
2997 // Disable compressed oops with shared spaces | |
2998 UseCompressedOops = false; | |
2999 } | |
3000 #endif | |
3001 | |
3002 // Set object alignment values. | 3022 // Set object alignment values. |
3003 set_object_alignment(); | 3023 set_object_alignment(); |
3004 | 3024 |
3005 #ifdef SERIALGC | 3025 #ifdef SERIALGC |
3006 force_serial_gc(); | 3026 force_serial_gc(); |
3011 | 3031 |
3012 // Set flags based on ergonomics. | 3032 // Set flags based on ergonomics. |
3013 set_ergonomics_flags(); | 3033 set_ergonomics_flags(); |
3014 | 3034 |
3015 #ifdef _LP64 | 3035 #ifdef _LP64 |
3016 // XXX JSR 292 currently does not support compressed oops. | 3036 if (UseCompressedOops) { |
3017 if (EnableMethodHandles && UseCompressedOops) { | 3037 check_compressed_oops_compat(); |
3018 if (FLAG_IS_DEFAULT(UseCompressedOops) || FLAG_IS_ERGO(UseCompressedOops)) { | 3038 } |
3019 UseCompressedOops = false; | 3039 #endif |
3020 } | |
3021 } | |
3022 #endif // _LP64 | |
3023 | 3040 |
3024 // Check the GC selections again. | 3041 // Check the GC selections again. |
3025 if (!check_gc_consistency()) { | 3042 if (!check_gc_consistency()) { |
3026 return JNI_EINVAL; | 3043 return JNI_EINVAL; |
3027 } | 3044 } |