Mercurial > hg > graal-jvmci-8
comparison src/share/vm/runtime/arguments.cpp @ 10264:735c995bf1a1
Merge
author | rbackman |
---|---|
date | Mon, 13 May 2013 07:53:45 +0200 |
parents | 194f52aa2f23 9b77ca4ce35e |
children | f944ba972151 |
comparison
equal
deleted
inserted
replaced
10251:6114c49b31b5 | 10264:735c995bf1a1 |
---|---|
2096 warning("PrintNMTStatistics is disabled, because native memory tracking is not enabled"); | 2096 warning("PrintNMTStatistics is disabled, because native memory tracking is not enabled"); |
2097 PrintNMTStatistics = false; | 2097 PrintNMTStatistics = false; |
2098 #if INCLUDE_NMT | 2098 #if INCLUDE_NMT |
2099 } | 2099 } |
2100 #endif | 2100 #endif |
2101 } | |
2102 | |
2103 // Need to limit the extent of the padding to reasonable size. | |
2104 // 8K is well beyond the reasonable HW cache line size, even with the | |
2105 // aggressive prefetching, while still leaving the room for segregating | |
2106 // among the distinct pages. | |
2107 if (ContendedPaddingWidth < 0 || ContendedPaddingWidth > 8192) { | |
2108 jio_fprintf(defaultStream::error_stream(), | |
2109 "ContendedPaddingWidth=" INTX_FORMAT " must be the between %d and %d\n", | |
2110 ContendedPaddingWidth, 0, 8192); | |
2111 status = false; | |
2112 } | |
2113 | |
2114 // Need to enforce the padding not to break the existing field alignments. | |
2115 // It is sufficient to check against the largest type size. | |
2116 if ((ContendedPaddingWidth % BytesPerLong) != 0) { | |
2117 jio_fprintf(defaultStream::error_stream(), | |
2118 "ContendedPaddingWidth=" INTX_FORMAT " must be the multiple of %d\n", | |
2119 ContendedPaddingWidth, BytesPerLong); | |
2120 status = false; | |
2101 } | 2121 } |
2102 | 2122 |
2103 return status; | 2123 return status; |
2104 } | 2124 } |
2105 | 2125 |
3095 } | 3115 } |
3096 return JNI_OK; | 3116 return JNI_OK; |
3097 } | 3117 } |
3098 | 3118 |
3099 void Arguments::set_shared_spaces_flags() { | 3119 void Arguments::set_shared_spaces_flags() { |
3100 const bool must_share = DumpSharedSpaces || RequireSharedSpaces; | 3120 #ifdef _LP64 |
3101 const bool might_share = must_share || UseSharedSpaces; | 3121 const bool must_share = DumpSharedSpaces || RequireSharedSpaces; |
3102 | 3122 |
3103 // CompressedOops cannot be used with CDS. The offsets of oopmaps and | 3123 // CompressedOops cannot be used with CDS. The offsets of oopmaps and |
3104 // static fields are incorrect in the archive. With some more clever | 3124 // static fields are incorrect in the archive. With some more clever |
3105 // initialization, this restriction can probably be lifted. | 3125 // initialization, this restriction can probably be lifted. |
3106 // ??? UseLargePages might be okay now | 3126 if (UseCompressedOops) { |
3107 const bool cannot_share = UseCompressedOops || | 3127 if (must_share) { |
3108 (UseLargePages && FLAG_IS_CMDLINE(UseLargePages)); | 3128 warning("disabling compressed oops because of %s", |
3109 if (cannot_share) { | 3129 DumpSharedSpaces ? "-Xshare:dump" : "-Xshare:on"); |
3110 if (must_share) { | 3130 FLAG_SET_CMDLINE(bool, UseCompressedOops, false); |
3111 warning("disabling large pages %s" | 3131 FLAG_SET_CMDLINE(bool, UseCompressedKlassPointers, false); |
3112 "because of %s", "" LP64_ONLY("and compressed oops "), | 3132 } else { |
3113 DumpSharedSpaces ? "-Xshare:dump" : "-Xshare:on"); | 3133 // Prefer compressed oops to class data sharing |
3114 FLAG_SET_CMDLINE(bool, UseLargePages, false); | 3134 if (UseSharedSpaces && Verbose) { |
3115 LP64_ONLY(FLAG_SET_CMDLINE(bool, UseCompressedOops, false)); | 3135 warning("turning off use of shared archive because of compressed oops"); |
3116 LP64_ONLY(FLAG_SET_CMDLINE(bool, UseCompressedKlassPointers, false)); | 3136 } |
3117 } else { | 3137 no_shared_spaces(); |
3118 // Prefer compressed oops and large pages to class data sharing | 3138 } |
3119 if (UseSharedSpaces && Verbose) { | 3139 } |
3120 warning("turning off use of shared archive because of large pages%s", | 3140 #endif |
3121 "" LP64_ONLY(" and/or compressed oops")); | |
3122 } | |
3123 no_shared_spaces(); | |
3124 } | |
3125 } else if (UseLargePages && might_share) { | |
3126 // Disable large pages to allow shared spaces. This is sub-optimal, since | |
3127 // there may not even be a shared archive to use. | |
3128 FLAG_SET_DEFAULT(UseLargePages, false); | |
3129 } | |
3130 | 3141 |
3131 if (DumpSharedSpaces) { | 3142 if (DumpSharedSpaces) { |
3132 if (RequireSharedSpaces) { | 3143 if (RequireSharedSpaces) { |
3133 warning("cannot dump shared archive while using shared archive"); | 3144 warning("cannot dump shared archive while using shared archive"); |
3134 } | 3145 } |