< prev index next >

src/share/vm/gc/serial/defNewGeneration.cpp

Print this page




 610   CollectorPolicy* cp = gch->collector_policy();
 611 
 612   FastScanClosure fsc_with_no_gc_barrier(this, false);
 613   FastScanClosure fsc_with_gc_barrier(this, true);
 614 
 615   KlassScanClosure klass_scan_closure(&fsc_with_no_gc_barrier,
 616                                       gch->rem_set()->klass_rem_set());
 617   CLDToKlassAndOopClosure cld_scan_closure(&klass_scan_closure,
 618                                            &fsc_with_no_gc_barrier,
 619                                            false);
 620 
 621   set_promo_failure_scan_stack_closure(&fsc_with_no_gc_barrier);
 622   FastEvacuateFollowersClosure evacuate_followers(gch, _level, this,
 623                                                   &fsc_with_no_gc_barrier,
 624                                                   &fsc_with_gc_barrier);
 625 
 626   assert(gch->no_allocs_since_save_marks(0),
 627          "save marks have not been newly set.");
 628 
 629   {
 630     // SerialGC runs with n_workers == 0.


 631     StrongRootsScope srs(0);
 632 
 633     gch->gen_process_roots(&srs,
 634                            _level,
 635                            true,  // Process younger gens, if any,
 636                                   // as strong roots.
 637                            GenCollectedHeap::SO_ScavengeCodeCache,
 638                            GenCollectedHeap::StrongAndWeakRoots,
 639                            &fsc_with_no_gc_barrier,
 640                            &fsc_with_gc_barrier,
 641                            &cld_scan_closure);
 642   }
 643 
 644   // "evacuate followers".
 645   evacuate_followers.do_void();
 646 
 647   FastKeepAliveClosure keep_alive(this, &scan_weak_ref);
 648   ReferenceProcessor* rp = ref_processor();
 649   rp->setup_policy(clear_all_soft_refs);
 650   const ReferenceProcessorStats& stats =




 610   CollectorPolicy* cp = gch->collector_policy();
 611 
 612   FastScanClosure fsc_with_no_gc_barrier(this, false);
 613   FastScanClosure fsc_with_gc_barrier(this, true);
 614 
 615   KlassScanClosure klass_scan_closure(&fsc_with_no_gc_barrier,
 616                                       gch->rem_set()->klass_rem_set());
 617   CLDToKlassAndOopClosure cld_scan_closure(&klass_scan_closure,
 618                                            &fsc_with_no_gc_barrier,
 619                                            false);
 620 
 621   set_promo_failure_scan_stack_closure(&fsc_with_no_gc_barrier);
 622   FastEvacuateFollowersClosure evacuate_followers(gch, _level, this,
 623                                                   &fsc_with_no_gc_barrier,
 624                                                   &fsc_with_gc_barrier);
 625 
 626   assert(gch->no_allocs_since_save_marks(0),
 627          "save marks have not been newly set.");
 628 
 629   {
 630     // DefNew needs to run with n_threads == 0, to make sure the serial
 631     // version of the card table scanning code is used.
 632     // See: CardTableModRefBS::non_clean_card_iterate_possibly_parallel.
 633     StrongRootsScope srs(0);
 634 
 635     gch->gen_process_roots(&srs,
 636                            _level,
 637                            true,  // Process younger gens, if any,
 638                                   // as strong roots.
 639                            GenCollectedHeap::SO_ScavengeCodeCache,
 640                            GenCollectedHeap::StrongAndWeakRoots,
 641                            &fsc_with_no_gc_barrier,
 642                            &fsc_with_gc_barrier,
 643                            &cld_scan_closure);
 644   }
 645 
 646   // "evacuate followers".
 647   evacuate_followers.do_void();
 648 
 649   FastKeepAliveClosure keep_alive(this, &scan_weak_ref);
 650   ReferenceProcessor* rp = ref_processor();
 651   rp->setup_policy(clear_all_soft_refs);
 652   const ReferenceProcessorStats& stats =


< prev index next >