< prev index next >

src/share/vm/runtime/arguments.cpp

Print this page




1658   if (FLAG_IS_DEFAULT(MaxTenuringThreshold) &&
1659       FLAG_IS_DEFAULT(SurvivorRatio)) {
1660     FLAG_SET_ERGO(uintx, MaxTenuringThreshold, tenuring_default);
1661   }
1662   // If we decided above (or user explicitly requested)
1663   // `promote all' (via MaxTenuringThreshold := 0),
1664   // prefer minuscule survivor spaces so as not to waste
1665   // space for (non-existent) survivors
1666   if (FLAG_IS_DEFAULT(SurvivorRatio) && MaxTenuringThreshold == 0) {
1667     FLAG_SET_ERGO(uintx, SurvivorRatio, MAX2((uintx)1024, SurvivorRatio));
1668   }
1669 
1670   // OldPLABSize is interpreted in CMS as not the size of the PLAB in words,
1671   // but rather the number of free blocks of a given size that are used when
1672   // replenishing the local per-worker free list caches.
1673   if (FLAG_IS_DEFAULT(OldPLABSize)) {
1674     if (!FLAG_IS_DEFAULT(ResizeOldPLAB) && !ResizeOldPLAB) {
1675       // OldPLAB sizing manually turned off: Use a larger default setting,
1676       // unless it was manually specified. This is because a too-low value
1677       // will slow down scavenges.
1678       FLAG_SET_ERGO(size_t, OldPLABSize, CFLS_LAB::_default_static_old_plab_size); // default value before 6631166
1679     } else {
1680       FLAG_SET_DEFAULT(OldPLABSize, CFLS_LAB::_default_dynamic_old_plab_size); // old CMSParPromoteBlocksToClaim default
1681     }
1682   }
1683 
1684   // If either of the static initialization defaults have changed, note this
1685   // modification.
1686   if (!FLAG_IS_DEFAULT(OldPLABSize) || !FLAG_IS_DEFAULT(OldPLABWeight)) {
1687     CFLS_LAB::modify_initialization(OldPLABSize, OldPLABWeight);
1688   }
1689 
1690   if (!ClassUnloading) {
1691     FLAG_SET_CMDLINE(bool, CMSClassUnloadingEnabled, false);
1692     FLAG_SET_CMDLINE(bool, ExplicitGCInvokesConcurrentAndUnloadsClasses, false);
1693   }
1694 
1695   log_trace(gc)("MarkStackSize: %uk  MarkStackSizeMax: %uk", (unsigned int) (MarkStackSize / K), (uint) (MarkStackSizeMax / K));
1696   log_trace(gc)("ConcGCThreads: %u", ConcGCThreads);
1697 }
1698 #endif // INCLUDE_ALL_GCS
1699 
1700 void set_object_alignment() {
1701   // Object alignment.
1702   assert(is_power_of_2(ObjectAlignmentInBytes), "ObjectAlignmentInBytes must be power of 2");
1703   MinObjAlignmentInBytes     = ObjectAlignmentInBytes;
1704   assert(MinObjAlignmentInBytes >= HeapWordsPerLong * HeapWordSize, "ObjectAlignmentInBytes value is too small");
1705   MinObjAlignment            = MinObjAlignmentInBytes / HeapWordSize;
1706   assert(MinObjAlignmentInBytes == MinObjAlignment * HeapWordSize, "ObjectAlignmentInBytes value is incorrect");
1707   MinObjAlignmentInBytesMask = MinObjAlignmentInBytes - 1;




1658   if (FLAG_IS_DEFAULT(MaxTenuringThreshold) &&
1659       FLAG_IS_DEFAULT(SurvivorRatio)) {
1660     FLAG_SET_ERGO(uintx, MaxTenuringThreshold, tenuring_default);
1661   }
1662   // If we decided above (or user explicitly requested)
1663   // `promote all' (via MaxTenuringThreshold := 0),
1664   // prefer minuscule survivor spaces so as not to waste
1665   // space for (non-existent) survivors
1666   if (FLAG_IS_DEFAULT(SurvivorRatio) && MaxTenuringThreshold == 0) {
1667     FLAG_SET_ERGO(uintx, SurvivorRatio, MAX2((uintx)1024, SurvivorRatio));
1668   }
1669 
1670   // OldPLABSize is interpreted in CMS as not the size of the PLAB in words,
1671   // but rather the number of free blocks of a given size that are used when
1672   // replenishing the local per-worker free list caches.
1673   if (FLAG_IS_DEFAULT(OldPLABSize)) {
1674     if (!FLAG_IS_DEFAULT(ResizeOldPLAB) && !ResizeOldPLAB) {
1675       // OldPLAB sizing manually turned off: Use a larger default setting,
1676       // unless it was manually specified. This is because a too-low value
1677       // will slow down scavenges.
1678       FLAG_SET_ERGO(size_t, OldPLABSize, CompactibleFreeListSpaceLAB::_default_static_old_plab_size); // default value before 6631166
1679     } else {
1680       FLAG_SET_DEFAULT(OldPLABSize, CompactibleFreeListSpaceLAB::_default_dynamic_old_plab_size); // old CMSParPromoteBlocksToClaim default
1681     }
1682   }
1683 
1684   // If either of the static initialization defaults have changed, note this
1685   // modification.
1686   if (!FLAG_IS_DEFAULT(OldPLABSize) || !FLAG_IS_DEFAULT(OldPLABWeight)) {
1687     CompactibleFreeListSpaceLAB::modify_initialization(OldPLABSize, OldPLABWeight);
1688   }
1689 
1690   if (!ClassUnloading) {
1691     FLAG_SET_CMDLINE(bool, CMSClassUnloadingEnabled, false);
1692     FLAG_SET_CMDLINE(bool, ExplicitGCInvokesConcurrentAndUnloadsClasses, false);
1693   }
1694 
1695   log_trace(gc)("MarkStackSize: %uk  MarkStackSizeMax: %uk", (unsigned int) (MarkStackSize / K), (uint) (MarkStackSizeMax / K));
1696   log_trace(gc)("ConcGCThreads: %u", ConcGCThreads);
1697 }
1698 #endif // INCLUDE_ALL_GCS
1699 
1700 void set_object_alignment() {
1701   // Object alignment.
1702   assert(is_power_of_2(ObjectAlignmentInBytes), "ObjectAlignmentInBytes must be power of 2");
1703   MinObjAlignmentInBytes     = ObjectAlignmentInBytes;
1704   assert(MinObjAlignmentInBytes >= HeapWordsPerLong * HeapWordSize, "ObjectAlignmentInBytes value is too small");
1705   MinObjAlignment            = MinObjAlignmentInBytes / HeapWordSize;
1706   assert(MinObjAlignmentInBytes == MinObjAlignment * HeapWordSize, "ObjectAlignmentInBytes value is incorrect");
1707   MinObjAlignmentInBytesMask = MinObjAlignmentInBytes - 1;


< prev index next >