1209 tty->print_cr("ConcGCThreads: %u", ConcGCThreads); |
1209 tty->print_cr("ConcGCThreads: %u", ConcGCThreads); |
1210 } |
1210 } |
1211 } |
1211 } |
1212 #endif // KERNEL |
1212 #endif // KERNEL |
1213 |
1213 |
|
1214 void set_object_alignment() { |
|
1215 // Object alignment. |
|
1216 assert(is_power_of_2(ObjectAlignmentInBytes), "ObjectAlignmentInBytes must be power of 2"); |
|
1217 MinObjAlignmentInBytes = ObjectAlignmentInBytes; |
|
1218 assert(MinObjAlignmentInBytes >= HeapWordsPerLong * HeapWordSize, "ObjectAlignmentInBytes value is too small"); |
|
1219 MinObjAlignment = MinObjAlignmentInBytes / HeapWordSize; |
|
1220 assert(MinObjAlignmentInBytes == MinObjAlignment * HeapWordSize, "ObjectAlignmentInBytes value is incorrect"); |
|
1221 MinObjAlignmentInBytesMask = MinObjAlignmentInBytes - 1; |
|
1222 |
|
1223 LogMinObjAlignmentInBytes = exact_log2(ObjectAlignmentInBytes); |
|
1224 LogMinObjAlignment = LogMinObjAlignmentInBytes - LogHeapWordSize; |
|
1225 |
|
1226 // Oop encoding heap max |
|
1227 OopEncodingHeapMax = (uint64_t(max_juint) + 1) << LogMinObjAlignmentInBytes; |
|
1228 |
|
1229 #ifndef KERNEL |
|
1230 // Set CMS global values |
|
1231 CompactibleFreeListSpace::set_cms_values(); |
|
1232 #endif // KERNEL |
|
1233 } |
|
1234 |
|
1235 bool verify_object_alignment() { |
|
1236 // Object alignment. |
|
1237 if (!is_power_of_2(ObjectAlignmentInBytes)) { |
|
1238 jio_fprintf(defaultStream::error_stream(), |
|
1239 "error: ObjectAlignmentInBytes=%d must be power of 2", (int)ObjectAlignmentInBytes); |
|
1240 return false; |
|
1241 } |
|
1242 if ((int)ObjectAlignmentInBytes < BytesPerLong) { |
|
1243 jio_fprintf(defaultStream::error_stream(), |
|
1244 "error: ObjectAlignmentInBytes=%d must be greater or equal %d", (int)ObjectAlignmentInBytes, BytesPerLong); |
|
1245 return false; |
|
1246 } |
|
1247 return true; |
|
1248 } |
|
1249 |
1214 inline uintx max_heap_for_compressed_oops() { |
1250 inline uintx max_heap_for_compressed_oops() { |
1215 LP64_ONLY(return oopDesc::OopEncodingHeapMax - MaxPermSize - os::vm_page_size()); |
1251 LP64_ONLY(return OopEncodingHeapMax - MaxPermSize - os::vm_page_size()); |
1216 NOT_LP64(ShouldNotReachHere(); return 0); |
1252 NOT_LP64(ShouldNotReachHere(); return 0); |
1217 } |
1253 } |
1218 |
1254 |
1219 bool Arguments::should_auto_select_low_pause_collector() { |
1255 bool Arguments::should_auto_select_low_pause_collector() { |
1220 if (UseAutoGCSelectPolicy && |
1256 if (UseAutoGCSelectPolicy && |
1773 |
1809 |
1774 // Limit the lower bound of this flag to 1 as it is used in a division |
1810 // Limit the lower bound of this flag to 1 as it is used in a division |
1775 // expression. |
1811 // expression. |
1776 status = status && verify_interval(TLABWasteTargetPercent, |
1812 status = status && verify_interval(TLABWasteTargetPercent, |
1777 1, 100, "TLABWasteTargetPercent"); |
1813 1, 100, "TLABWasteTargetPercent"); |
|
1814 |
|
1815 status = status && verify_object_alignment(); |
1778 |
1816 |
1779 return status; |
1817 return status; |
1780 } |
1818 } |
1781 |
1819 |
1782 bool Arguments::is_bad_option(const JavaVMOption* option, jboolean ignore, |
1820 bool Arguments::is_bad_option(const JavaVMOption* option, jboolean ignore, |