< prev index next >

src/share/vm/gc/shenandoah/shenandoahMarkCompact.cpp

Print this page




 300   ReferenceProcessor* rp = _heap->ref_processor();
 301   // enable ("weak") refs discovery
 302   rp->enable_discovery(true /*verify_no_refs*/);
 303   rp->setup_policy(true); // snapshot the soft ref policy to be used in this cycle
 304   rp->set_active_mt_degree(_heap->workers()->active_workers());
 305 
 306   COMPILER2_PRESENT(DerivedPointerTable::clear());
 307   cm->update_roots();
 308   COMPILER2_PRESENT(DerivedPointerTable::update_pointers());
 309 
 310   cm->mark_roots();
 311   cm->shared_finish_mark_from_roots(/* full_gc = */ true);
 312 
 313   _heap->swap_mark_bitmaps();
 314 
 315   if (UseShenandoahMatrix) {
 316     if (PrintShenandoahMatrix) {
 317       outputStream* log = Log(gc)::info_stream();
 318       _heap->connection_matrix()->print_on(log);
 319     }
 320     if (VerifyShenandoahMatrix) {
 321       _heap->verify_matrix();
 322     }



 323   }
 324 
 325   if (VerifyDuringGC) {
 326     HandleMark hm;  // handle scope
 327     //    Universe::heap()->prepare_for_verify();
 328     _heap->prepare_for_verify();
 329     // Note: we can verify only the heap here. When an object is
 330     // marked, the previous value of the mark word (including
 331     // identity hash values, ages, etc) is preserved, and the mark
 332     // word is set to markOop::marked_value - effectively removing
 333     // any hash values from the mark word. These hash values are
 334     // used when verifying the dictionaries and so removing them
 335     // from the mark word can make verification of the dictionaries
 336     // fail. At the end of the GC, the original mark word values
 337     // (including hash values) are restored to the appropriate
 338     // objects.
 339     //    Universe::heap()->verify(VerifySilently, VerifyOption_G1UseMarkWord);
 340     _heap->verify(VerifyOption_G1UseMarkWord);
 341   }
 342 




 300   ReferenceProcessor* rp = _heap->ref_processor();
 301   // enable ("weak") refs discovery
 302   rp->enable_discovery(true /*verify_no_refs*/);
 303   rp->setup_policy(true); // snapshot the soft ref policy to be used in this cycle
 304   rp->set_active_mt_degree(_heap->workers()->active_workers());
 305 
 306   COMPILER2_PRESENT(DerivedPointerTable::clear());
 307   cm->update_roots();
 308   COMPILER2_PRESENT(DerivedPointerTable::update_pointers());
 309 
 310   cm->mark_roots();
 311   cm->shared_finish_mark_from_roots(/* full_gc = */ true);
 312 
 313   _heap->swap_mark_bitmaps();
 314 
 315   if (UseShenandoahMatrix) {
 316     if (PrintShenandoahMatrix) {
 317       outputStream* log = Log(gc)::info_stream();
 318       _heap->connection_matrix()->print_on(log);
 319     }


 320   }
 321 
 322   if (ShenandoahVerify || (UseShenandoahMatrix && VerifyShenandoahMatrix)) {
 323     _heap->verify_heap_reachable_at_safepoint();
 324   }
 325 
 326   if (VerifyDuringGC) {
 327     HandleMark hm;  // handle scope
 328     //    Universe::heap()->prepare_for_verify();
 329     _heap->prepare_for_verify();
 330     // Note: we can verify only the heap here. When an object is
 331     // marked, the previous value of the mark word (including
 332     // identity hash values, ages, etc) is preserved, and the mark
 333     // word is set to markOop::marked_value - effectively removing
 334     // any hash values from the mark word. These hash values are
 335     // used when verifying the dictionaries and so removing them
 336     // from the mark word can make verification of the dictionaries
 337     // fail. At the end of the GC, the original mark word values
 338     // (including hash values) are restored to the appropriate
 339     // objects.
 340     //    Universe::heap()->verify(VerifySilently, VerifyOption_G1UseMarkWord);
 341     _heap->verify(VerifyOption_G1UseMarkWord);
 342   }
 343 


< prev index next >