1715 tty->print_cr("ConcGCThreads: %u", (uint) ConcGCThreads);
1716 }
1717 }
1718
1719 void Arguments::set_shenandoah_gc_flags() {
1720
1721 #if !(defined AARCH64 || defined AMD64 || defined IA32)
1722 UNSUPPORTED_GC_OPTION(UseShenandoahGC);
1723 #endif
1724
1725 #if 0 // leave this block as stepping stone for future platforms
1726 warning("Shenandoah GC is not fully supported on this platform:");
1727 warning(" concurrent modes are not supported, only STW cycles are enabled;");
1728 warning(" arch-specific barrier code is not implemented, disabling barriers;");
1729
1730 #if INCLUDE_ALL_GCS
1731 FLAG_SET_DEFAULT(ShenandoahGCHeuristics, "passive");
1732
1733 FLAG_SET_DEFAULT(ShenandoahSATBBarrier, false);
1734 FLAG_SET_DEFAULT(ShenandoahLoadRefBarrier, false);
1735 FLAG_SET_DEFAULT(ShenandoahCASBarrier, false);
1736 FLAG_SET_DEFAULT(ShenandoahCloneBarrier, false);
1737
1738 FLAG_SET_DEFAULT(ShenandoahVerifyOptoBarriers, false);
1739 #endif
1740 #endif
1741
1742 #if INCLUDE_ALL_GCS
1743 if (!FLAG_IS_DEFAULT(ShenandoahGarbageThreshold)) {
1744 if (0 > ShenandoahGarbageThreshold || ShenandoahGarbageThreshold > 100) {
1745 vm_exit_during_initialization("The flag -XX:ShenandoahGarbageThreshold is out of range", NULL);
1746 }
1747 }
1748
1749 if (!FLAG_IS_DEFAULT(ShenandoahAllocationThreshold)) {
1750 if (0 > ShenandoahAllocationThreshold || ShenandoahAllocationThreshold > 100) {
1751 vm_exit_during_initialization("The flag -XX:ShenandoahAllocationThreshold is out of range", NULL);
1752 }
1753 }
1754
1826 // When sampling is enabled, max out the PerfData memory to get more
1827 // Shenandoah data in, including Matrix.
1828 FLAG_SET_DEFAULT(PerfDataMemorySize, 2048*K);
1829 }
1830 #endif
1831
1832 #ifdef COMPILER2
1833 // Shenandoah cares more about pause times, rather than raw throughput.
1834 // Enabling safepoints in counted loops makes it more responsive with
1835 // long loops. However, it is risky in 8u, due to bugs it brings, for
1836 // example JDK-8176506. Warn user about this, and proceed.
1837 if (UseCountedLoopSafepoints) {
1838 warning("Enabling -XX:UseCountedLoopSafepoints is known to cause JVM bugs. Use at your own risk.");
1839 }
1840
1841 #ifdef ASSERT
1842 // C2 barrier verification is only reliable when all default barriers are enabled
1843 if (ShenandoahVerifyOptoBarriers &&
1844 (!FLAG_IS_DEFAULT(ShenandoahSATBBarrier) ||
1845 !FLAG_IS_DEFAULT(ShenandoahLoadRefBarrier) ||
1846 !FLAG_IS_DEFAULT(ShenandoahCASBarrier) ||
1847 !FLAG_IS_DEFAULT(ShenandoahCloneBarrier)
1848 )) {
1849 warning("Unusual barrier configuration, disabling C2 barrier verification");
1850 FLAG_SET_DEFAULT(ShenandoahVerifyOptoBarriers, false);
1851 }
1852 #else
1853 guarantee(!ShenandoahVerifyOptoBarriers, "Should be disabled");
1854 #endif // ASSERT
1855 #endif // COMPILER2
1856
1857 #if INCLUDE_ALL_GCS
1858 if (AlwaysPreTouch) {
1859 // Shenandoah handles pre-touch on its own. It does not let the
1860 // generic storage code to do the pre-touch before Shenandoah has
1861 // a chance to do it on its own.
1862 FLAG_SET_DEFAULT(AlwaysPreTouch, false);
1863 FLAG_SET_DEFAULT(ShenandoahAlwaysPreTouch, true);
1864 }
1865
|
1715 tty->print_cr("ConcGCThreads: %u", (uint) ConcGCThreads);
1716 }
1717 }
1718
1719 void Arguments::set_shenandoah_gc_flags() {
1720
1721 #if !(defined AARCH64 || defined AMD64 || defined IA32)
1722 UNSUPPORTED_GC_OPTION(UseShenandoahGC);
1723 #endif
1724
1725 #if 0 // leave this block as stepping stone for future platforms
1726 warning("Shenandoah GC is not fully supported on this platform:");
1727 warning(" concurrent modes are not supported, only STW cycles are enabled;");
1728 warning(" arch-specific barrier code is not implemented, disabling barriers;");
1729
1730 #if INCLUDE_ALL_GCS
1731 FLAG_SET_DEFAULT(ShenandoahGCHeuristics, "passive");
1732
1733 FLAG_SET_DEFAULT(ShenandoahSATBBarrier, false);
1734 FLAG_SET_DEFAULT(ShenandoahLoadRefBarrier, false);
1735 FLAG_SET_DEFAULT(ShenandoahKeepAliveBarrier, false);
1736 FLAG_SET_DEFAULT(ShenandoahStoreValEnqueueBarrier, false);
1737 FLAG_SET_DEFAULT(ShenandoahCASBarrier, false);
1738 FLAG_SET_DEFAULT(ShenandoahCloneBarrier, false);
1739
1740 FLAG_SET_DEFAULT(ShenandoahVerifyOptoBarriers, false);
1741 #endif
1742 #endif
1743
1744 #if INCLUDE_ALL_GCS
1745 if (!FLAG_IS_DEFAULT(ShenandoahGarbageThreshold)) {
1746 if (0 > ShenandoahGarbageThreshold || ShenandoahGarbageThreshold > 100) {
1747 vm_exit_during_initialization("The flag -XX:ShenandoahGarbageThreshold is out of range", NULL);
1748 }
1749 }
1750
1751 if (!FLAG_IS_DEFAULT(ShenandoahAllocationThreshold)) {
1752 if (0 > ShenandoahAllocationThreshold || ShenandoahAllocationThreshold > 100) {
1753 vm_exit_during_initialization("The flag -XX:ShenandoahAllocationThreshold is out of range", NULL);
1754 }
1755 }
1756
1828 // When sampling is enabled, max out the PerfData memory to get more
1829 // Shenandoah data in, including Matrix.
1830 FLAG_SET_DEFAULT(PerfDataMemorySize, 2048*K);
1831 }
1832 #endif
1833
1834 #ifdef COMPILER2
1835 // Shenandoah cares more about pause times, rather than raw throughput.
1836 // Enabling safepoints in counted loops makes it more responsive with
1837 // long loops. However, it is risky in 8u, due to bugs it brings, for
1838 // example JDK-8176506. Warn user about this, and proceed.
1839 if (UseCountedLoopSafepoints) {
1840 warning("Enabling -XX:UseCountedLoopSafepoints is known to cause JVM bugs. Use at your own risk.");
1841 }
1842
1843 #ifdef ASSERT
1844 // C2 barrier verification is only reliable when all default barriers are enabled
1845 if (ShenandoahVerifyOptoBarriers &&
1846 (!FLAG_IS_DEFAULT(ShenandoahSATBBarrier) ||
1847 !FLAG_IS_DEFAULT(ShenandoahLoadRefBarrier) ||
1848 !FLAG_IS_DEFAULT(ShenandoahKeepAliveBarrier) ||
1849 !FLAG_IS_DEFAULT(ShenandoahStoreValEnqueueBarrier) ||
1850 !FLAG_IS_DEFAULT(ShenandoahCASBarrier) ||
1851 !FLAG_IS_DEFAULT(ShenandoahCloneBarrier)
1852 )) {
1853 warning("Unusual barrier configuration, disabling C2 barrier verification");
1854 FLAG_SET_DEFAULT(ShenandoahVerifyOptoBarriers, false);
1855 }
1856 #else
1857 guarantee(!ShenandoahVerifyOptoBarriers, "Should be disabled");
1858 #endif // ASSERT
1859 #endif // COMPILER2
1860
1861 #if INCLUDE_ALL_GCS
1862 if (AlwaysPreTouch) {
1863 // Shenandoah handles pre-touch on its own. It does not let the
1864 // generic storage code to do the pre-touch before Shenandoah has
1865 // a chance to do it on its own.
1866 FLAG_SET_DEFAULT(AlwaysPreTouch, false);
1867 FLAG_SET_DEFAULT(ShenandoahAlwaysPreTouch, true);
1868 }
1869
|