131 ClassLoaderDataGraph::clear_claimed_marks(); |
131 ClassLoaderDataGraph::clear_claimed_marks(); |
132 |
132 |
133 sh->process_strong_roots(true, // activate StrongRootsScope |
133 sh->process_strong_roots(true, // activate StrongRootsScope |
134 SharedHeap::SO_SystemClasses, |
134 SharedHeap::SO_SystemClasses, |
135 &GenMarkSweep::follow_root_closure, |
135 &GenMarkSweep::follow_root_closure, |
136 &GenMarkSweep::follow_code_root_closure, |
|
137 &GenMarkSweep::follow_klass_closure); |
136 &GenMarkSweep::follow_klass_closure); |
138 |
137 |
139 // Process reference objects found during marking |
138 // Process reference objects found during marking |
140 ReferenceProcessor* rp = GenMarkSweep::ref_processor(); |
139 ReferenceProcessor* rp = GenMarkSweep::ref_processor(); |
141 assert(rp == G1CollectedHeap::heap()->ref_processor_stw(), "Sanity"); |
140 assert(rp == G1CollectedHeap::heap()->ref_processor_stw(), "Sanity"); |
305 |
304 |
306 // Need cleared claim bits for the strong roots processing |
305 // Need cleared claim bits for the strong roots processing |
307 ClassLoaderDataGraph::clear_claimed_marks(); |
306 ClassLoaderDataGraph::clear_claimed_marks(); |
308 |
307 |
309 sh->process_strong_roots(true, // activate StrongRootsScope |
308 sh->process_strong_roots(true, // activate StrongRootsScope |
310 SharedHeap::SO_AllClasses, |
309 SharedHeap::SO_AllClasses | SharedHeap::SO_AllCodeCache, |
311 &GenMarkSweep::adjust_pointer_closure, |
310 &GenMarkSweep::adjust_pointer_closure, |
312 NULL, // do not touch code cache here |
|
313 &GenMarkSweep::adjust_klass_closure); |
311 &GenMarkSweep::adjust_klass_closure); |
314 |
312 |
315 assert(GenMarkSweep::ref_processor() == g1h->ref_processor_stw(), "Sanity"); |
313 assert(GenMarkSweep::ref_processor() == g1h->ref_processor_stw(), "Sanity"); |
316 g1h->ref_processor_stw()->weak_oops_do(&GenMarkSweep::adjust_pointer_closure); |
314 g1h->ref_processor_stw()->weak_oops_do(&GenMarkSweep::adjust_pointer_closure); |
317 |
315 |
318 // Now adjust pointers in remaining weak roots. (All of which should |
316 // Now adjust pointers in remaining weak roots. (All of which should |
319 // have been cleared if they pointed to non-surviving objects.) |
317 // have been cleared if they pointed to non-surviving objects.) |
320 g1h->g1_process_weak_roots(&GenMarkSweep::adjust_pointer_closure); |
318 sh->process_weak_roots(&GenMarkSweep::adjust_pointer_closure); |
321 |
319 |
322 GenMarkSweep::adjust_marks(); |
320 GenMarkSweep::adjust_marks(); |
323 |
321 |
324 G1AdjustPointersClosure blk; |
322 G1AdjustPointersClosure blk; |
325 g1h->heap_region_iterate(&blk); |
323 g1h->heap_region_iterate(&blk); |