< prev index next >

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

Print this page




 599   init_assuming_no_promotion_failure();
 600 
 601   GCTraceTime(Trace, gc, phases) tm("DefNew", NULL, gch->gc_cause());
 602 
 603   gch->trace_heap_before_gc(&gc_tracer);
 604 
 605   // These can be shared for all code paths
 606   IsAliveClosure is_alive(this);
 607   ScanWeakRefClosure scan_weak_ref(this);
 608 
 609   age_table()->clear();
 610   to()->clear(SpaceDecorator::Mangle);
 611   // The preserved marks should be empty at the start of the GC.
 612   _preserved_marks_set.init(1);
 613 
 614   gch->rem_set()->prepare_for_younger_refs_iterate(false);
 615 
 616   assert(gch->no_allocs_since_save_marks(),
 617          "save marks have not been newly set.");
 618 
 619   // Not very pretty.
 620   CollectorPolicy* cp = gch->collector_policy();
 621 
 622   FastScanClosure fsc_with_no_gc_barrier(this, false);
 623   FastScanClosure fsc_with_gc_barrier(this, true);
 624 
 625   CLDScanClosure cld_scan_closure(&fsc_with_no_gc_barrier,
 626                                   gch->rem_set()->cld_rem_set()->accumulate_modified_oops());
 627 
 628   set_promo_failure_scan_stack_closure(&fsc_with_no_gc_barrier);
 629   FastEvacuateFollowersClosure evacuate_followers(gch,
 630                                                   &fsc_with_no_gc_barrier,
 631                                                   &fsc_with_gc_barrier);
 632 
 633   assert(gch->no_allocs_since_save_marks(),
 634          "save marks have not been newly set.");
 635 
 636   {
 637     // DefNew needs to run with n_threads == 0, to make sure the serial
 638     // version of the card table scanning code is used.
 639     // See: CardTableModRefBSForCTRS::non_clean_card_iterate_possibly_parallel.
 640     StrongRootsScope srs(0);
 641 




 599   init_assuming_no_promotion_failure();
 600 
 601   GCTraceTime(Trace, gc, phases) tm("DefNew", NULL, gch->gc_cause());
 602 
 603   gch->trace_heap_before_gc(&gc_tracer);
 604 
 605   // These can be shared for all code paths
 606   IsAliveClosure is_alive(this);
 607   ScanWeakRefClosure scan_weak_ref(this);
 608 
 609   age_table()->clear();
 610   to()->clear(SpaceDecorator::Mangle);
 611   // The preserved marks should be empty at the start of the GC.
 612   _preserved_marks_set.init(1);
 613 
 614   gch->rem_set()->prepare_for_younger_refs_iterate(false);
 615 
 616   assert(gch->no_allocs_since_save_marks(),
 617          "save marks have not been newly set.");
 618 



 619   FastScanClosure fsc_with_no_gc_barrier(this, false);
 620   FastScanClosure fsc_with_gc_barrier(this, true);
 621 
 622   CLDScanClosure cld_scan_closure(&fsc_with_no_gc_barrier,
 623                                   gch->rem_set()->cld_rem_set()->accumulate_modified_oops());
 624 
 625   set_promo_failure_scan_stack_closure(&fsc_with_no_gc_barrier);
 626   FastEvacuateFollowersClosure evacuate_followers(gch,
 627                                                   &fsc_with_no_gc_barrier,
 628                                                   &fsc_with_gc_barrier);
 629 
 630   assert(gch->no_allocs_since_save_marks(),
 631          "save marks have not been newly set.");
 632 
 633   {
 634     // DefNew needs to run with n_threads == 0, to make sure the serial
 635     // version of the card table scanning code is used.
 636     // See: CardTableModRefBSForCTRS::non_clean_card_iterate_possibly_parallel.
 637     StrongRootsScope srs(0);
 638 


< prev index next >