2030 uint conc_threads = MAX2((uint) 1, ParallelGCThreads);
2031 FLAG_SET_DEFAULT(ConcGCThreads, conc_threads);
2032 }
2033
2034 if (FLAG_IS_DEFAULT(ParallelRefProcEnabled)) {
2035 FLAG_SET_DEFAULT(ParallelRefProcEnabled, true);
2036 }
2037
2038 if (FLAG_IS_DEFAULT(PerfDataMemorySize)) {
2039 FLAG_SET_DEFAULT(PerfDataMemorySize, 512*K);
2040 }
2041
2042 #ifdef COMPILER2
2043 // Shenandoah cares more about pause times, rather than raw throughput.
2044 if (FLAG_IS_DEFAULT(UseCountedLoopSafepoints)) {
2045 FLAG_SET_DEFAULT(UseCountedLoopSafepoints, true);
2046 }
2047 if (UseCountedLoopSafepoints && FLAG_IS_DEFAULT(LoopStripMiningIter)) {
2048 FLAG_SET_DEFAULT(LoopStripMiningIter, 1000);
2049 }
2050 #endif
2051
2052 if (AlwaysPreTouch) {
2053 // Shenandoah handles pre-touch on its own. It does not let the
2054 // generic storage code to do the pre-touch before Shenandoah has
2055 // a chance to do it on its own.
2056 FLAG_SET_DEFAULT(AlwaysPreTouch, false);
2057 FLAG_SET_DEFAULT(ShenandoahAlwaysPreTouch, true);
2058 }
2059
2060 if (ShenandoahConcurrentEvacCodeRoots) {
2061 if (!ShenandoahBarriersForConst) {
2062 if (FLAG_IS_DEFAULT(ShenandoahBarriersForConst)) {
2063 warning("Concurrent code cache evacuation is enabled, enabling barriers for constants.");
2064 FLAG_SET_DEFAULT(ShenandoahBarriersForConst, true);
2065 } else {
2066 warning("Concurrent code cache evacuation is enabled, but barriers for constants are disabled. "
2067 "This may lead to surprising crashes.");
2068 }
2069 }
2070 } else {
|
2030 uint conc_threads = MAX2((uint) 1, ParallelGCThreads);
2031 FLAG_SET_DEFAULT(ConcGCThreads, conc_threads);
2032 }
2033
2034 if (FLAG_IS_DEFAULT(ParallelRefProcEnabled)) {
2035 FLAG_SET_DEFAULT(ParallelRefProcEnabled, true);
2036 }
2037
2038 if (FLAG_IS_DEFAULT(PerfDataMemorySize)) {
2039 FLAG_SET_DEFAULT(PerfDataMemorySize, 512*K);
2040 }
2041
2042 #ifdef COMPILER2
2043 // Shenandoah cares more about pause times, rather than raw throughput.
2044 if (FLAG_IS_DEFAULT(UseCountedLoopSafepoints)) {
2045 FLAG_SET_DEFAULT(UseCountedLoopSafepoints, true);
2046 }
2047 if (UseCountedLoopSafepoints && FLAG_IS_DEFAULT(LoopStripMiningIter)) {
2048 FLAG_SET_DEFAULT(LoopStripMiningIter, 1000);
2049 }
2050
2051 #ifdef ASSERT
2052 // C2 barrier verification is only reliable when all default barriers are enabled
2053 if (ShenandoahVerifyOptoBarriers &&
2054 (!FLAG_IS_DEFAULT(ShenandoahSATBBarrier) ||
2055 !FLAG_IS_DEFAULT(ShenandoahConditionalSATBBarrier) ||
2056 !FLAG_IS_DEFAULT(ShenandoahKeepAliveBarrier) ||
2057 !FLAG_IS_DEFAULT(ShenandoahReadBarrier) ||
2058 !FLAG_IS_DEFAULT(ShenandoahStoreValWriteBarrier) ||
2059 !FLAG_IS_DEFAULT(ShenandoahStoreValReadBarrier) ||
2060 !FLAG_IS_DEFAULT(ShenandoahCASBarrier) ||
2061 !FLAG_IS_DEFAULT(ShenandoahAcmpBarrier) ||
2062 !FLAG_IS_DEFAULT(ShenandoahCloneBarrier)
2063 )) {
2064 warning("Unusual barrier configuration, disabling C2 barrier verification");
2065 FLAG_SET_DEFAULT(ShenandoahVerifyOptoBarriers, false);
2066 }
2067 #else
2068 guarantee(!ShenandoahVerifyOptoBarriers, "Should be disabled");
2069 #endif // ASSERT
2070 #endif // COMPILER2
2071
2072 if (AlwaysPreTouch) {
2073 // Shenandoah handles pre-touch on its own. It does not let the
2074 // generic storage code to do the pre-touch before Shenandoah has
2075 // a chance to do it on its own.
2076 FLAG_SET_DEFAULT(AlwaysPreTouch, false);
2077 FLAG_SET_DEFAULT(ShenandoahAlwaysPreTouch, true);
2078 }
2079
2080 if (ShenandoahConcurrentEvacCodeRoots) {
2081 if (!ShenandoahBarriersForConst) {
2082 if (FLAG_IS_DEFAULT(ShenandoahBarriersForConst)) {
2083 warning("Concurrent code cache evacuation is enabled, enabling barriers for constants.");
2084 FLAG_SET_DEFAULT(ShenandoahBarriersForConst, true);
2085 } else {
2086 warning("Concurrent code cache evacuation is enabled, but barriers for constants are disabled. "
2087 "This may lead to surprising crashes.");
2088 }
2089 }
2090 } else {
|