8034764: Use process_strong_roots to adjust the StringTable
authorstefank
Fri, 14 Feb 2014 09:29:56 +0100
changeset 22883 5378704451dc
parent 22882 195c8f70d605
child 22884 5cadaf2c3f32
8034764: Use process_strong_roots to adjust the StringTable Reviewed-by: tschatzl, brutisso
hotspot/src/share/vm/gc_implementation/g1/g1MarkSweep.cpp
hotspot/src/share/vm/memory/genMarkSweep.cpp
hotspot/src/share/vm/memory/sharedHeap.cpp
hotspot/src/share/vm/memory/sharedHeap.hpp
--- a/hotspot/src/share/vm/gc_implementation/g1/g1MarkSweep.cpp	Thu Feb 13 17:44:39 2014 +0100
+++ b/hotspot/src/share/vm/gc_implementation/g1/g1MarkSweep.cpp	Fri Feb 14 09:29:56 2014 +0100
@@ -306,7 +306,7 @@
   ClassLoaderDataGraph::clear_claimed_marks();
 
   sh->process_strong_roots(true,  // activate StrongRootsScope
-                           SharedHeap::SO_AllClasses | SharedHeap::SO_AllCodeCache,
+                           SharedHeap::SO_AllClasses | SharedHeap::SO_Strings | SharedHeap::SO_AllCodeCache,
                            &GenMarkSweep::adjust_pointer_closure,
                            &GenMarkSweep::adjust_klass_closure);
 
--- a/hotspot/src/share/vm/memory/genMarkSweep.cpp	Thu Feb 13 17:44:39 2014 +0100
+++ b/hotspot/src/share/vm/memory/genMarkSweep.cpp	Fri Feb 14 09:29:56 2014 +0100
@@ -294,7 +294,7 @@
   gch->gen_process_strong_roots(level,
                                 false, // Younger gens are not roots.
                                 true,  // activate StrongRootsScope
-                                SharedHeap::SO_AllClasses | SharedHeap::SO_AllCodeCache,
+                                SharedHeap::SO_AllClasses | SharedHeap::SO_Strings | SharedHeap::SO_AllCodeCache,
                                 &adjust_pointer_closure,
                                 &adjust_pointer_closure,
                                 &adjust_klass_closure);
--- a/hotspot/src/share/vm/memory/sharedHeap.cpp	Thu Feb 13 17:44:39 2014 +0100
+++ b/hotspot/src/share/vm/memory/sharedHeap.cpp	Fri Feb 14 09:29:56 2014 +0100
@@ -237,8 +237,6 @@
 void SharedHeap::process_weak_roots(OopClosure* root_closure) {
   // Global (weak) JNI handles
   JNIHandles::weak_oops_do(&always_true, root_closure);
-
-  StringTable::oops_do(root_closure);
 }
 
 void SharedHeap::set_barrier_set(BarrierSet* bs) {
--- a/hotspot/src/share/vm/memory/sharedHeap.hpp	Thu Feb 13 17:44:39 2014 +0100
+++ b/hotspot/src/share/vm/memory/sharedHeap.hpp	Fri Feb 14 09:29:56 2014 +0100
@@ -240,8 +240,7 @@
                             OopClosure* roots,
                             KlassClosure* klass_closure);
 
-  // Apply "root_closure" to all the weak roots of the system.
-  // These include JNI weak roots and string table.
+  // Apply "root_closure" to the JNI weak roots..
   void process_weak_roots(OopClosure* root_closure);
 
   // The functions below are helper functions that a subclass of