229 run_task(&task);
230
231 // Serial compact to avoid OOM when very few free regions.
232 if (serial_compaction_point()->has_regions()) {
233 task.serial_compaction();
234 }
235 }
236
237 void G1FullCollector::restore_marks() {
238 SharedRestorePreservedMarksTaskExecutor task_executor(_heap->workers());
239 _preserved_marks_set.restore(&task_executor);
240 _preserved_marks_set.reclaim();
241 }
242
243 void G1FullCollector::run_task(AbstractGangTask* task) {
244 _heap->workers()->run_task(task, _num_workers);
245 }
246
247 void G1FullCollector::verify_after_marking() {
248 if (!VerifyDuringGC || !_heap->verifier()->should_verify(G1HeapVerifier::G1VerifyFull)) {
249 //Only do verification if VerifyDuringGC and Verify_Full is set.
250 return;
251 }
252
253 HandleMark hm; // handle scope
254 #if COMPILER2_OR_JVMCI
255 DerivedPointerTableDeactivate dpt_deact;
256 #endif
257 _heap->prepare_for_verify();
258 // Note: we can verify only the heap here. When an object is
259 // marked, the previous value of the mark word (including
260 // identity hash values, ages, etc) is preserved, and the mark
261 // word is set to markOop::marked_value - effectively removing
262 // any hash values from the mark word. These hash values are
263 // used when verifying the dictionaries and so removing them
264 // from the mark word can make verification of the dictionaries
265 // fail. At the end of the GC, the original mark word values
266 // (including hash values) are restored to the appropriate
267 // objects.
268 GCTraceTime(Info, gc, verify)("Verifying During GC (full)");
269 _heap->verify(VerifyOption_G1UseFullMarking);
|
229 run_task(&task);
230
231 // Serial compact to avoid OOM when very few free regions.
232 if (serial_compaction_point()->has_regions()) {
233 task.serial_compaction();
234 }
235 }
236
237 void G1FullCollector::restore_marks() {
238 SharedRestorePreservedMarksTaskExecutor task_executor(_heap->workers());
239 _preserved_marks_set.restore(&task_executor);
240 _preserved_marks_set.reclaim();
241 }
242
243 void G1FullCollector::run_task(AbstractGangTask* task) {
244 _heap->workers()->run_task(task, _num_workers);
245 }
246
247 void G1FullCollector::verify_after_marking() {
248 if (!VerifyDuringGC || !_heap->verifier()->should_verify(G1HeapVerifier::G1VerifyFull)) {
249 // Only do verification if VerifyDuringGC and G1VerifyFull is set.
250 return;
251 }
252
253 HandleMark hm; // handle scope
254 #if COMPILER2_OR_JVMCI
255 DerivedPointerTableDeactivate dpt_deact;
256 #endif
257 _heap->prepare_for_verify();
258 // Note: we can verify only the heap here. When an object is
259 // marked, the previous value of the mark word (including
260 // identity hash values, ages, etc) is preserved, and the mark
261 // word is set to markOop::marked_value - effectively removing
262 // any hash values from the mark word. These hash values are
263 // used when verifying the dictionaries and so removing them
264 // from the mark word can make verification of the dictionaries
265 // fail. At the end of the GC, the original mark word values
266 // (including hash values) are restored to the appropriate
267 // objects.
268 GCTraceTime(Info, gc, verify)("Verifying During GC (full)");
269 _heap->verify(VerifyOption_G1UseFullMarking);
|