< prev index next >

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

Print this page




  88 }
  89 
  90 void DefNewGeneration::FastKeepAliveClosure::do_oop(oop* p)       { DefNewGeneration::FastKeepAliveClosure::do_oop_work(p); }
  91 void DefNewGeneration::FastKeepAliveClosure::do_oop(narrowOop* p) { DefNewGeneration::FastKeepAliveClosure::do_oop_work(p); }
  92 
  93 DefNewGeneration::FastEvacuateFollowersClosure::
  94 FastEvacuateFollowersClosure(SerialHeap* heap,
  95                              FastScanClosure* cur,
  96                              FastScanClosure* older) :
  97   _heap(heap), _scan_cur_or_nonheap(cur), _scan_older(older)
  98 {
  99 }
 100 
 101 void DefNewGeneration::FastEvacuateFollowersClosure::do_void() {
 102   do {
 103     _heap->oop_since_save_marks_iterate(_scan_cur_or_nonheap, _scan_older);
 104   } while (!_heap->no_allocs_since_save_marks());
 105   guarantee(_heap->young_gen()->promo_failure_scan_is_complete(), "Failed to finish scan");
 106 }
 107 
 108 ScanClosure::ScanClosure(DefNewGeneration* g, bool gc_barrier) :
 109     OopsInClassLoaderDataOrGenClosure(g), _g(g), _gc_barrier(gc_barrier)
 110 {
 111   _boundary = _g->reserved().end();
 112 }
 113 
 114 FastScanClosure::FastScanClosure(DefNewGeneration* g, bool gc_barrier) :
 115     OopsInClassLoaderDataOrGenClosure(g), _g(g), _gc_barrier(gc_barrier)
 116 {
 117   _boundary = _g->reserved().end();
 118 }
 119 
 120 void CLDScanClosure::do_cld(ClassLoaderData* cld) {
 121   NOT_PRODUCT(ResourceMark rm);
 122   log_develop_trace(gc, scavenge)("CLDScanClosure::do_cld " PTR_FORMAT ", %s, dirty: %s",
 123                                   p2i(cld),
 124                                   cld->loader_name_and_id(),
 125                                   cld->has_modified_oops() ? "true" : "false");
 126 
 127   // If the cld has not been dirtied we know that there's
 128   // no references into  the young gen and we can skip it.
 129   if (cld->has_modified_oops()) {
 130     if (_accumulate_modified_oops) {
 131       cld->accumulate_modified_oops();
 132     }
 133 




  88 }
  89 
  90 void DefNewGeneration::FastKeepAliveClosure::do_oop(oop* p)       { DefNewGeneration::FastKeepAliveClosure::do_oop_work(p); }
  91 void DefNewGeneration::FastKeepAliveClosure::do_oop(narrowOop* p) { DefNewGeneration::FastKeepAliveClosure::do_oop_work(p); }
  92 
  93 DefNewGeneration::FastEvacuateFollowersClosure::
  94 FastEvacuateFollowersClosure(SerialHeap* heap,
  95                              FastScanClosure* cur,
  96                              FastScanClosure* older) :
  97   _heap(heap), _scan_cur_or_nonheap(cur), _scan_older(older)
  98 {
  99 }
 100 
 101 void DefNewGeneration::FastEvacuateFollowersClosure::do_void() {
 102   do {
 103     _heap->oop_since_save_marks_iterate(_scan_cur_or_nonheap, _scan_older);
 104   } while (!_heap->no_allocs_since_save_marks());
 105   guarantee(_heap->young_gen()->promo_failure_scan_is_complete(), "Failed to finish scan");
 106 }
 107 






 108 FastScanClosure::FastScanClosure(DefNewGeneration* g, bool gc_barrier) :
 109     OopsInClassLoaderDataOrGenClosure(g), _g(g), _gc_barrier(gc_barrier)
 110 {
 111   _boundary = _g->reserved().end();
 112 }
 113 
 114 void CLDScanClosure::do_cld(ClassLoaderData* cld) {
 115   NOT_PRODUCT(ResourceMark rm);
 116   log_develop_trace(gc, scavenge)("CLDScanClosure::do_cld " PTR_FORMAT ", %s, dirty: %s",
 117                                   p2i(cld),
 118                                   cld->loader_name_and_id(),
 119                                   cld->has_modified_oops() ? "true" : "false");
 120 
 121   // If the cld has not been dirtied we know that there's
 122   // no references into  the young gen and we can skip it.
 123   if (cld->has_modified_oops()) {
 124     if (_accumulate_modified_oops) {
 125       cld->accumulate_modified_oops();
 126     }
 127 


< prev index next >