109 // ensure that a) the pause time target is maximized with respect to
110 // the pause interval and b) we maintain the invariant that pause
111 // time target < pause interval. If the user does not want this
112 // maximum flexibility, they will have to set the pause interval
113 // explicitly.
114
115 if (FLAG_IS_DEFAULT(MaxGCPauseMillis)) {
116 // The default pause time target in G1 is 200ms
117 FLAG_SET_DEFAULT(MaxGCPauseMillis, 200);
118 }
119
120 // Then, if the interval parameter was not set, set it according to
121 // the pause time target (this will also deal with the case when the
122 // pause time target is the default value).
123 if (FLAG_IS_DEFAULT(GCPauseIntervalMillis)) {
124 FLAG_SET_DEFAULT(GCPauseIntervalMillis, MaxGCPauseMillis + 1);
125 }
126
127 log_trace(gc)("MarkStackSize: %uk MarkStackSizeMax: %uk", (unsigned int) (MarkStackSize / K), (uint) (MarkStackSizeMax / K));
128
129 #ifdef COMPILER2
130 // Enable loop strip mining to offer better pause time guarantees
131 if (FLAG_IS_DEFAULT(UseCountedLoopSafepoints)) {
132 FLAG_SET_DEFAULT(UseCountedLoopSafepoints, true);
133 if (FLAG_IS_DEFAULT(LoopStripMiningIter)) {
134 FLAG_SET_DEFAULT(LoopStripMiningIter, 1000);
135 }
136 }
137 #endif
138
139 initialize_verification_types();
140 }
141
142 CollectedHeap* G1Arguments::create_heap() {
143 return create_heap_with_policy<G1CollectedHeap, G1CollectorPolicy>();
144 }
|
109 // ensure that a) the pause time target is maximized with respect to
110 // the pause interval and b) we maintain the invariant that pause
111 // time target < pause interval. If the user does not want this
112 // maximum flexibility, they will have to set the pause interval
113 // explicitly.
114
115 if (FLAG_IS_DEFAULT(MaxGCPauseMillis)) {
116 // The default pause time target in G1 is 200ms
117 FLAG_SET_DEFAULT(MaxGCPauseMillis, 200);
118 }
119
120 // Then, if the interval parameter was not set, set it according to
121 // the pause time target (this will also deal with the case when the
122 // pause time target is the default value).
123 if (FLAG_IS_DEFAULT(GCPauseIntervalMillis)) {
124 FLAG_SET_DEFAULT(GCPauseIntervalMillis, MaxGCPauseMillis + 1);
125 }
126
127 log_trace(gc)("MarkStackSize: %uk MarkStackSizeMax: %uk", (unsigned int) (MarkStackSize / K), (uint) (MarkStackSizeMax / K));
128
129 // By default do not let the target stack size to be more than 1/4 of the entries
130 if (FLAG_IS_DEFAULT(GCDrainStackTargetSize)) {
131 FLAG_SET_ERGO(uintx, GCDrainStackTargetSize, MIN2(GCDrainStackTargetSize, (uintx)TASKQUEUE_SIZE / 4));
132 }
133
134 #ifdef COMPILER2
135 // Enable loop strip mining to offer better pause time guarantees
136 if (FLAG_IS_DEFAULT(UseCountedLoopSafepoints)) {
137 FLAG_SET_DEFAULT(UseCountedLoopSafepoints, true);
138 if (FLAG_IS_DEFAULT(LoopStripMiningIter)) {
139 FLAG_SET_DEFAULT(LoopStripMiningIter, 1000);
140 }
141 }
142 #endif
143
144 initialize_verification_types();
145 }
146
147 CollectedHeap* G1Arguments::create_heap() {
148 return create_heap_with_policy<G1CollectedHeap, G1CollectorPolicy>();
149 }
|