81 }
82
83 if (ShenandoahRegionSampling && FLAG_IS_DEFAULT(PerfDataMemorySize)) {
84 // When sampling is enabled, max out the PerfData memory to get more
85 // Shenandoah data in, including Matrix.
86 FLAG_SET_DEFAULT(PerfDataMemorySize, 2048*K);
87 }
88
89 #ifdef COMPILER2
90 // Shenandoah cares more about pause times, rather than raw throughput.
91 if (FLAG_IS_DEFAULT(UseCountedLoopSafepoints)) {
92 FLAG_SET_DEFAULT(UseCountedLoopSafepoints, true);
93 if (FLAG_IS_DEFAULT(LoopStripMiningIter)) {
94 FLAG_SET_DEFAULT(LoopStripMiningIter, 1000);
95 }
96 }
97 #ifdef ASSERT
98 // C2 barrier verification is only reliable when all default barriers are enabled
99 if (ShenandoahVerifyOptoBarriers &&
100 (!FLAG_IS_DEFAULT(ShenandoahSATBBarrier) ||
101 !FLAG_IS_DEFAULT(ShenandoahConditionalSATBBarrier) ||
102 !FLAG_IS_DEFAULT(ShenandoahKeepAliveBarrier) ||
103 !FLAG_IS_DEFAULT(ShenandoahWriteBarrier) ||
104 !FLAG_IS_DEFAULT(ShenandoahReadBarrier) ||
105 !FLAG_IS_DEFAULT(ShenandoahStoreValEnqueueBarrier) ||
106 !FLAG_IS_DEFAULT(ShenandoahStoreValWriteBarrier) ||
107 !FLAG_IS_DEFAULT(ShenandoahStoreValReadBarrier) ||
108 !FLAG_IS_DEFAULT(ShenandoahCASBarrier) ||
109 !FLAG_IS_DEFAULT(ShenandoahAcmpBarrier) ||
110 !FLAG_IS_DEFAULT(ShenandoahCloneBarrier)
111 )) {
112 warning("Unusual barrier configuration, disabling C2 barrier verification");
113 FLAG_SET_DEFAULT(ShenandoahVerifyOptoBarriers, false);
114 }
115 #else
116 guarantee(!ShenandoahVerifyOptoBarriers, "Should be disabled");
117 #endif // ASSERT
118 #endif // COMPILER2
119
120 if (AlwaysPreTouch) {
121 // Shenandoah handles pre-touch on its own. It does not let the
122 // generic storage code to do the pre-touch before Shenandoah has
123 // a chance to do it on its own.
124 FLAG_SET_DEFAULT(AlwaysPreTouch, false);
125 FLAG_SET_DEFAULT(ShenandoahAlwaysPreTouch, true);
126 }
|
81 }
82
83 if (ShenandoahRegionSampling && FLAG_IS_DEFAULT(PerfDataMemorySize)) {
84 // When sampling is enabled, max out the PerfData memory to get more
85 // Shenandoah data in, including Matrix.
86 FLAG_SET_DEFAULT(PerfDataMemorySize, 2048*K);
87 }
88
89 #ifdef COMPILER2
90 // Shenandoah cares more about pause times, rather than raw throughput.
91 if (FLAG_IS_DEFAULT(UseCountedLoopSafepoints)) {
92 FLAG_SET_DEFAULT(UseCountedLoopSafepoints, true);
93 if (FLAG_IS_DEFAULT(LoopStripMiningIter)) {
94 FLAG_SET_DEFAULT(LoopStripMiningIter, 1000);
95 }
96 }
97 #ifdef ASSERT
98 // C2 barrier verification is only reliable when all default barriers are enabled
99 if (ShenandoahVerifyOptoBarriers &&
100 (!FLAG_IS_DEFAULT(ShenandoahSATBBarrier) ||
101 !FLAG_IS_DEFAULT(ShenandoahKeepAliveBarrier) ||
102 !FLAG_IS_DEFAULT(ShenandoahWriteBarrier) ||
103 !FLAG_IS_DEFAULT(ShenandoahReadBarrier) ||
104 !FLAG_IS_DEFAULT(ShenandoahStoreValEnqueueBarrier) ||
105 !FLAG_IS_DEFAULT(ShenandoahStoreValReadBarrier) ||
106 !FLAG_IS_DEFAULT(ShenandoahCASBarrier) ||
107 !FLAG_IS_DEFAULT(ShenandoahAcmpBarrier) ||
108 !FLAG_IS_DEFAULT(ShenandoahCloneBarrier)
109 )) {
110 warning("Unusual barrier configuration, disabling C2 barrier verification");
111 FLAG_SET_DEFAULT(ShenandoahVerifyOptoBarriers, false);
112 }
113 #else
114 guarantee(!ShenandoahVerifyOptoBarriers, "Should be disabled");
115 #endif // ASSERT
116 #endif // COMPILER2
117
118 if (AlwaysPreTouch) {
119 // Shenandoah handles pre-touch on its own. It does not let the
120 // generic storage code to do the pre-touch before Shenandoah has
121 // a chance to do it on its own.
122 FLAG_SET_DEFAULT(AlwaysPreTouch, false);
123 FLAG_SET_DEFAULT(ShenandoahAlwaysPreTouch, true);
124 }
|