hotspot/src/share/vm/gc_implementation/g1/g1MarkSweep.cpp
changeset 25491 70fb742e40aa
parent 25490 59f226da8d81
child 25492 d27050bdfb04
--- a/hotspot/src/share/vm/gc_implementation/g1/g1MarkSweep.cpp	Mon Jul 07 10:12:40 2014 +0200
+++ b/hotspot/src/share/vm/gc_implementation/g1/g1MarkSweep.cpp	Mon Jul 07 12:37:11 2014 +0200
@@ -129,15 +129,13 @@
 
   SharedHeap* sh = SharedHeap::heap();
 
-  // Need cleared claim bits for the roots processing
+  // Need cleared claim bits for the strong roots processing
   ClassLoaderDataGraph::clear_claimed_marks();
 
-  MarkingCodeBlobClosure follow_code_closure(&GenMarkSweep::follow_root_closure, !CodeBlobToOopClosure::FixRelocations);
-  sh->process_strong_roots(true,   // activate StrongRootsScope
-                           SharedHeap::SO_None,
+  sh->process_strong_roots(true,  // activate StrongRootsScope
+                           SharedHeap::SO_SystemClasses,
                            &GenMarkSweep::follow_root_closure,
-                           &GenMarkSweep::follow_cld_closure,
-                           &follow_code_closure);
+                           &GenMarkSweep::follow_klass_closure);
 
   // Process reference objects found during marking
   ReferenceProcessor* rp = GenMarkSweep::ref_processor();
@@ -306,15 +304,13 @@
 
   SharedHeap* sh = SharedHeap::heap();
 
-  // Need cleared claim bits for the roots processing
+  // Need cleared claim bits for the strong roots processing
   ClassLoaderDataGraph::clear_claimed_marks();
 
-  CodeBlobToOopClosure adjust_code_closure(&GenMarkSweep::adjust_pointer_closure, CodeBlobToOopClosure::FixRelocations);
-  sh->process_all_roots(true,  // activate StrongRootsScope
-                        SharedHeap::SO_AllCodeCache,
-                        &GenMarkSweep::adjust_pointer_closure,
-                        &GenMarkSweep::adjust_cld_closure,
-                        &adjust_code_closure);
+  sh->process_strong_roots(true,  // activate StrongRootsScope
+                           SharedHeap::SO_AllClasses | SharedHeap::SO_Strings | SharedHeap::SO_AllCodeCache,
+                           &GenMarkSweep::adjust_pointer_closure,
+                           &GenMarkSweep::adjust_klass_closure);
 
   assert(GenMarkSweep::ref_processor() == g1h->ref_processor_stw(), "Sanity");
   g1h->ref_processor_stw()->weak_oops_do(&GenMarkSweep::adjust_pointer_closure);