< prev index next >

src/hotspot/share/gc/parallel/psScavenge.inline.hpp

CLD claiming

128   }                                                                                                                                  
129 };                                                                                                                                   
130 
131 // Scavenges the oop in a ClassLoaderData.                                                                                           
132 class PSScavengeCLDClosure: public CLDClosure {                                                                                      
133  private:                                                                                                                            
134   PSScavengeFromCLDClosure _oop_closure;                                                                                             
135  protected:                                                                                                                          
136  public:                                                                                                                             
137   PSScavengeCLDClosure(PSPromotionManager* pm) : _oop_closure(pm) { }                                                                
138   void do_cld(ClassLoaderData* cld) {                                                                                                
139     // If the cld has not been dirtied we know that there's                                                                          
140     // no references into  the young gen and we can skip it.                                                                         
141 
142     if (cld->has_modified_oops()) {                                                                                                  
143       // Setup the promotion manager to redirty this cld                                                                             
144       // if references are left in the young gen.                                                                                    
145       _oop_closure.set_scanned_cld(cld);                                                                                             
146 
147       // Clean the cld since we're going to scavenge all the metadata.                                                               
148       cld->oops_do(&_oop_closure, false, /*clear_modified_oops*/true);                                                               
149 
150       _oop_closure.set_scanned_cld(NULL);                                                                                            
151     }                                                                                                                                
152   }                                                                                                                                  
153 };                                                                                                                                   
154 
155 
156 #endif // SHARE_VM_GC_PARALLEL_PSSCAVENGE_INLINE_HPP                                                                                 

128   }
129 };
130 
131 // Scavenges the oop in a ClassLoaderData.
132 class PSScavengeCLDClosure: public CLDClosure {
133  private:
134   PSScavengeFromCLDClosure _oop_closure;
135  protected:
136  public:
137   PSScavengeCLDClosure(PSPromotionManager* pm) : _oop_closure(pm) { }
138   void do_cld(ClassLoaderData* cld) {
139     // If the cld has not been dirtied we know that there's
140     // no references into  the young gen and we can skip it.
141 
142     if (cld->has_modified_oops()) {
143       // Setup the promotion manager to redirty this cld
144       // if references are left in the young gen.
145       _oop_closure.set_scanned_cld(cld);
146 
147       // Clean the cld since we're going to scavenge all the metadata.
148       cld->oops_do(&_oop_closure, ClassLoaderData::_claim_value_none, /*clear_modified_oops*/true);
149 
150       _oop_closure.set_scanned_cld(NULL);
151     }
152   }
153 };
154 
155 
156 #endif // SHARE_VM_GC_PARALLEL_PSSCAVENGE_INLINE_HPP
< prev index next >