< prev index next >

src/hotspot/share/gc/parallel/psParallelCompact.cpp

Print this page




2197 }
2198 
2199 void PSParallelCompact::adjust_roots(ParCompactionManager* cm) {
2200   // Adjust the pointers to reflect the new locations
2201   GCTraceTime(Info, gc, phases) tm("Adjust Roots", &_gc_timer);
2202 
2203   // Need new claim bits when tracing through and adjusting pointers.
2204   ClassLoaderDataGraph::clear_claimed_marks();
2205 
2206   PCAdjustPointerClosure oop_closure(cm);
2207 
2208   // General strong roots.
2209   Universe::oops_do(&oop_closure);
2210   JNIHandles::oops_do(&oop_closure);   // Global (strong) JNI handles
2211   Threads::oops_do(&oop_closure, NULL);
2212   ObjectSynchronizer::oops_do(&oop_closure);
2213   Management::oops_do(&oop_closure);
2214   JvmtiExport::oops_do(&oop_closure);
2215   SystemDictionary::oops_do(&oop_closure);
2216   CLDToOopClosure cld_closure(&oop_closure, ClassLoaderData::_claim_strong);
2217   ClassLoaderDataGraph::cld_do(&cld_closure);
2218 
2219   // Now adjust pointers in remaining weak roots.  (All of which should
2220   // have been cleared if they pointed to non-surviving objects.)
2221   WeakProcessor::oops_do(&oop_closure);
2222 
2223   CodeBlobToOopClosure adjust_from_blobs(&oop_closure, CodeBlobToOopClosure::FixRelocations);
2224   CodeCache::blobs_do(&adjust_from_blobs);
2225   AOTLoader::oops_do(&oop_closure);
2226   StringTable::oops_do(&oop_closure);
2227   ref_processor()->weak_oops_do(&oop_closure);
2228   // Roots were visited so references into the young gen in roots
2229   // may have been scanned.  Process them also.
2230   // Should the reference processor have a span that excludes
2231   // young gen objects?
2232   PSScavenge::reference_processor()->weak_oops_do(&oop_closure);
2233 }
2234 
2235 // Helper class to print 8 region numbers per line and then print the total at the end.
2236 class FillableRegionLogger : public StackObj {
2237 private:




2197 }
2198 
2199 void PSParallelCompact::adjust_roots(ParCompactionManager* cm) {
2200   // Adjust the pointers to reflect the new locations
2201   GCTraceTime(Info, gc, phases) tm("Adjust Roots", &_gc_timer);
2202 
2203   // Need new claim bits when tracing through and adjusting pointers.
2204   ClassLoaderDataGraph::clear_claimed_marks();
2205 
2206   PCAdjustPointerClosure oop_closure(cm);
2207 
2208   // General strong roots.
2209   Universe::oops_do(&oop_closure);
2210   JNIHandles::oops_do(&oop_closure);   // Global (strong) JNI handles
2211   Threads::oops_do(&oop_closure, NULL);
2212   ObjectSynchronizer::oops_do(&oop_closure);
2213   Management::oops_do(&oop_closure);
2214   JvmtiExport::oops_do(&oop_closure);
2215   SystemDictionary::oops_do(&oop_closure);
2216   CLDToOopClosure cld_closure(&oop_closure, ClassLoaderData::_claim_strong);
2217   ClassLoaderDataGraph::cld_oops_do(&cld_closure);
2218 
2219   // Now adjust pointers in remaining weak roots.  (All of which should
2220   // have been cleared if they pointed to non-surviving objects.)
2221   WeakProcessor::oops_do(&oop_closure);
2222 
2223   CodeBlobToOopClosure adjust_from_blobs(&oop_closure, CodeBlobToOopClosure::FixRelocations);
2224   CodeCache::blobs_do(&adjust_from_blobs);
2225   AOTLoader::oops_do(&oop_closure);
2226   StringTable::oops_do(&oop_closure);
2227   ref_processor()->weak_oops_do(&oop_closure);
2228   // Roots were visited so references into the young gen in roots
2229   // may have been scanned.  Process them also.
2230   // Should the reference processor have a span that excludes
2231   // young gen objects?
2232   PSScavenge::reference_processor()->weak_oops_do(&oop_closure);
2233 }
2234 
2235 // Helper class to print 8 region numbers per line and then print the total at the end.
2236 class FillableRegionLogger : public StackObj {
2237 private:


< prev index next >