< prev index next >

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

Print this page

        

*** 119,169 **** } while (!_gch->no_allocs_since_save_marks()); guarantee(_young_gen->promo_failure_scan_is_complete(), "Failed to finish scan"); } ScanClosure::ScanClosure(DefNewGeneration* g, bool gc_barrier) : ! OopsInKlassOrGenClosure(g), _g(g), _gc_barrier(gc_barrier) { _boundary = _g->reserved().end(); } void ScanClosure::do_oop(oop* p) { ScanClosure::do_oop_work(p); } void ScanClosure::do_oop(narrowOop* p) { ScanClosure::do_oop_work(p); } FastScanClosure::FastScanClosure(DefNewGeneration* g, bool gc_barrier) : ! OopsInKlassOrGenClosure(g), _g(g), _gc_barrier(gc_barrier) { _boundary = _g->reserved().end(); } void FastScanClosure::do_oop(oop* p) { FastScanClosure::do_oop_work(p); } void FastScanClosure::do_oop(narrowOop* p) { FastScanClosure::do_oop_work(p); } ! void KlassScanClosure::do_klass(Klass* klass) { NOT_PRODUCT(ResourceMark rm); ! log_develop_trace(gc, scavenge)("KlassScanClosure::do_klass " PTR_FORMAT ", %s, dirty: %s", ! p2i(klass), ! klass->external_name(), ! klass->has_modified_oops() ? "true" : "false"); ! // If the klass has not been dirtied we know that there's // no references into the young gen and we can skip it. ! if (klass->has_modified_oops()) { if (_accumulate_modified_oops) { ! klass->accumulate_modified_oops(); } ! // Clear this state since we're going to scavenge all the metadata. ! klass->clear_modified_oops(); ! ! // Tell the closure which Klass is being scanned so that it can be dirtied // if oops are left pointing into the young gen. ! _scavenge_closure->set_scanned_klass(klass); ! klass->oops_do(_scavenge_closure); ! _scavenge_closure->set_scanned_klass(NULL); } } ScanWeakRefClosure::ScanWeakRefClosure(DefNewGeneration* g) : _g(g) --- 119,167 ---- } while (!_gch->no_allocs_since_save_marks()); guarantee(_young_gen->promo_failure_scan_is_complete(), "Failed to finish scan"); } ScanClosure::ScanClosure(DefNewGeneration* g, bool gc_barrier) : ! OopsInClassLoaderDataOrGenClosure(g), _g(g), _gc_barrier(gc_barrier) { _boundary = _g->reserved().end(); } void ScanClosure::do_oop(oop* p) { ScanClosure::do_oop_work(p); } void ScanClosure::do_oop(narrowOop* p) { ScanClosure::do_oop_work(p); } FastScanClosure::FastScanClosure(DefNewGeneration* g, bool gc_barrier) : ! OopsInClassLoaderDataOrGenClosure(g), _g(g), _gc_barrier(gc_barrier) { _boundary = _g->reserved().end(); } void FastScanClosure::do_oop(oop* p) { FastScanClosure::do_oop_work(p); } void FastScanClosure::do_oop(narrowOop* p) { FastScanClosure::do_oop_work(p); } ! void CLDScanClosure::do_cld(ClassLoaderData* cld) { NOT_PRODUCT(ResourceMark rm); ! log_develop_trace(gc, scavenge)("CLDScanClosure::do_cld " PTR_FORMAT ", %s, dirty: %s", ! p2i(cld), ! cld->loader_name(), ! cld->has_modified_oops() ? "true" : "false"); ! // If the cld has not been dirtied we know that there's // no references into the young gen and we can skip it. ! if (cld->has_modified_oops()) { if (_accumulate_modified_oops) { ! cld->accumulate_modified_oops(); } ! // Tell the closure which CLD is being scanned so that it can be dirtied // if oops are left pointing into the young gen. ! _scavenge_closure->set_scanned_cld(cld); ! // Clean the cld since we're going to scavenge all the metadata. ! cld->oops_do(_scavenge_closure, false, /*clear_modified_oops*/true); ! _scavenge_closure->set_scanned_cld(NULL); } } ScanWeakRefClosure::ScanWeakRefClosure(DefNewGeneration* g) : _g(g)
*** 175,190 **** void ScanWeakRefClosure::do_oop(narrowOop* p) { ScanWeakRefClosure::do_oop_work(p); } void FilteringClosure::do_oop(oop* p) { FilteringClosure::do_oop_work(p); } void FilteringClosure::do_oop(narrowOop* p) { FilteringClosure::do_oop_work(p); } - KlassScanClosure::KlassScanClosure(OopsInKlassOrGenClosure* scavenge_closure, - KlassRemSet* klass_rem_set) - : _scavenge_closure(scavenge_closure), - _accumulate_modified_oops(klass_rem_set->accumulate_modified_oops()) {} - - DefNewGeneration::DefNewGeneration(ReservedSpace rs, size_t initial_size, const char* policy) : Generation(rs, initial_size), _preserved_marks_set(false /* in_c_heap */), --- 173,182 ----
*** 627,641 **** CollectorPolicy* cp = gch->collector_policy(); FastScanClosure fsc_with_no_gc_barrier(this, false); FastScanClosure fsc_with_gc_barrier(this, true); ! KlassScanClosure klass_scan_closure(&fsc_with_no_gc_barrier, ! gch->rem_set()->klass_rem_set()); ! CLDToKlassAndOopClosure cld_scan_closure(&klass_scan_closure, ! &fsc_with_no_gc_barrier, ! false); set_promo_failure_scan_stack_closure(&fsc_with_no_gc_barrier); FastEvacuateFollowersClosure evacuate_followers(gch, &fsc_with_no_gc_barrier, &fsc_with_gc_barrier); --- 619,630 ---- CollectorPolicy* cp = gch->collector_policy(); FastScanClosure fsc_with_no_gc_barrier(this, false); FastScanClosure fsc_with_gc_barrier(this, true); ! CLDScanClosure cld_scan_closure(&fsc_with_no_gc_barrier, ! gch->rem_set()->cld_rem_set()->accumulate_modified_oops()); set_promo_failure_scan_stack_closure(&fsc_with_no_gc_barrier); FastEvacuateFollowersClosure evacuate_followers(gch, &fsc_with_no_gc_barrier, &fsc_with_gc_barrier);
< prev index next >