1673 if (FLAG_IS_DEFAULT(MinSurvivorRatio)) {
1674 FLAG_SET_DEFAULT(MinSurvivorRatio, SurvivorRatio + 2);
1675 }
1676 }
1677
1678 if (UseParallelOldGC) {
1679 // Par compact uses lower default values since they are treated as
1680 // minimums. These are different defaults because of the different
1681 // interpretation and are not ergonomically set.
1682 if (FLAG_IS_DEFAULT(MarkSweepDeadRatio)) {
1683 FLAG_SET_DEFAULT(MarkSweepDeadRatio, 1);
1684 }
1685 }
1686 }
1687
1688 void Arguments::set_g1_gc_flags() {
1689 assert(UseG1GC, "Error");
1690 #ifdef COMPILER1
1691 FastTLABRefill = false;
1692 #endif
1693 FLAG_SET_DEFAULT(ParallelGCThreads,
1694 Abstract_VM_Version::parallel_worker_threads());
1695 if (ParallelGCThreads == 0) {
1696 FLAG_SET_DEFAULT(ParallelGCThreads,
1697 Abstract_VM_Version::parallel_worker_threads());
1698 }
1699
1700 #if INCLUDE_ALL_GCS
1701 if (G1ConcRefinementThreads == 0) {
1702 FLAG_SET_DEFAULT(G1ConcRefinementThreads, ParallelGCThreads);
1703 }
1704 #endif
1705
1706 // MarkStackSize will be set (if it hasn't been set by the user)
1707 // when concurrent marking is initialized.
1708 // Its value will be based upon the number of parallel marking threads.
1709 // But we do set the maximum mark stack size here.
1710 if (FLAG_IS_DEFAULT(MarkStackSizeMax)) {
1711 FLAG_SET_DEFAULT(MarkStackSizeMax, 128 * TASKQUEUE_SIZE);
1712 }
1713
1714 if (FLAG_IS_DEFAULT(GCTimeRatio) || GCTimeRatio == 0) {
1715 // In G1, we want the default GC overhead goal to be higher than
1716 // say in PS. So we set it here to 10%. Otherwise the heap might
1717 // be expanded more aggressively than we would like it to. In
|
1673 if (FLAG_IS_DEFAULT(MinSurvivorRatio)) {
1674 FLAG_SET_DEFAULT(MinSurvivorRatio, SurvivorRatio + 2);
1675 }
1676 }
1677
1678 if (UseParallelOldGC) {
1679 // Par compact uses lower default values since they are treated as
1680 // minimums. These are different defaults because of the different
1681 // interpretation and are not ergonomically set.
1682 if (FLAG_IS_DEFAULT(MarkSweepDeadRatio)) {
1683 FLAG_SET_DEFAULT(MarkSweepDeadRatio, 1);
1684 }
1685 }
1686 }
1687
1688 void Arguments::set_g1_gc_flags() {
1689 assert(UseG1GC, "Error");
1690 #ifdef COMPILER1
1691 FastTLABRefill = false;
1692 #endif
1693 FLAG_SET_DEFAULT(ParallelGCThreads, Abstract_VM_Version::parallel_worker_threads());
1694 if (ParallelGCThreads == 0) {
1695 assert(!FLAG_IS_DEFAULT(ParallelGCThreads), "The default value for ParallelGCThreads should not be 0.");
1696 jio_fprintf(defaultStream::error_stream(), "The G1 GC can not be combined with -XX:ParallelGCThreads=0\n");
1697 vm_exit(1);
1698 }
1699
1700 #if INCLUDE_ALL_GCS
1701 if (G1ConcRefinementThreads == 0) {
1702 FLAG_SET_DEFAULT(G1ConcRefinementThreads, ParallelGCThreads);
1703 }
1704 #endif
1705
1706 // MarkStackSize will be set (if it hasn't been set by the user)
1707 // when concurrent marking is initialized.
1708 // Its value will be based upon the number of parallel marking threads.
1709 // But we do set the maximum mark stack size here.
1710 if (FLAG_IS_DEFAULT(MarkStackSizeMax)) {
1711 FLAG_SET_DEFAULT(MarkStackSizeMax, 128 * TASKQUEUE_SIZE);
1712 }
1713
1714 if (FLAG_IS_DEFAULT(GCTimeRatio) || GCTimeRatio == 0) {
1715 // In G1, we want the default GC overhead goal to be higher than
1716 // say in PS. So we set it here to 10%. Otherwise the heap might
1717 // be expanded more aggressively than we would like it to. In
|