equal
deleted
inserted
replaced
154 // the "end" logging is inside the loop and not at the end of |
154 // the "end" logging is inside the loop and not at the end of |
155 // a scope. Mimicking the same log output as GCTraceConcTime instead. |
155 // a scope. Mimicking the same log output as GCTraceConcTime instead. |
156 jlong mark_start = os::elapsed_counter(); |
156 jlong mark_start = os::elapsed_counter(); |
157 log_info(gc, marking)("Concurrent Mark (%.3fs)", TimeHelper::counter_to_seconds(mark_start)); |
157 log_info(gc, marking)("Concurrent Mark (%.3fs)", TimeHelper::counter_to_seconds(mark_start)); |
158 |
158 |
159 int iter = 0; |
159 for (uint iter = 1; true; ++iter) { |
160 do { |
|
161 iter++; |
|
162 if (!cm()->has_aborted()) { |
160 if (!cm()->has_aborted()) { |
163 G1ConcPhaseTimer t(_cm, "Concurrent Mark From Roots"); |
161 G1ConcPhaseTimer t(_cm, "Concurrent Mark From Roots"); |
164 _cm->mark_from_roots(); |
162 _cm->mark_from_roots(); |
165 } |
163 } |
166 |
164 |
176 |
174 |
177 CMCheckpointRootsFinalClosure final_cl(_cm); |
175 CMCheckpointRootsFinalClosure final_cl(_cm); |
178 VM_CGC_Operation op(&final_cl, "Pause Remark"); |
176 VM_CGC_Operation op(&final_cl, "Pause Remark"); |
179 VMThread::execute(&op); |
177 VMThread::execute(&op); |
180 } |
178 } |
181 if (cm()->restart_for_overflow()) { |
179 |
182 log_debug(gc, marking)("Restarting Concurrent Marking because of Mark Stack Overflow in Remark (Iteration #%d).", iter); |
180 if (!cm()->restart_for_overflow() || cm()->has_aborted()) { |
183 log_info(gc, marking)("Concurrent Mark Restart due to overflow"); |
181 break; |
184 } |
182 } |
185 } while (cm()->restart_for_overflow()); |
183 |
|
184 log_info(gc, marking)("Concurrent Mark Restart due to overflow" |
|
185 " (iteration #%u", iter); |
|
186 } |
186 |
187 |
187 if (!cm()->has_aborted()) { |
188 if (!cm()->has_aborted()) { |
188 G1ConcPhaseTimer t(_cm, "Concurrent Create Live Data"); |
189 G1ConcPhaseTimer t(_cm, "Concurrent Create Live Data"); |
189 cm()->create_live_data(); |
190 cm()->create_live_data(); |
190 } |
191 } |