changeset 6035:10c424c5a362

8034764: Use process_strong_roots to adjust the StringTable Reviewed-by: tschatzl, brutisso
author stefank
date Fri, 14 Feb 2014 09:29:56 +0100
parents d166675568f6
children aa8fab3bed11
files src/share/vm/gc_implementation/g1/g1MarkSweep.cpp src/share/vm/memory/genMarkSweep.cpp src/share/vm/memory/sharedHeap.cpp src/share/vm/memory/sharedHeap.hpp
diffstat 4 files changed, 3 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/gc_implementation/g1/g1MarkSweep.cpp	Thu Feb 13 17:44:39 2014 +0100
+++ b/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/src/share/vm/memory/genMarkSweep.cpp	Thu Feb 13 17:44:39 2014 +0100
+++ b/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/src/share/vm/memory/sharedHeap.cpp	Thu Feb 13 17:44:39 2014 +0100
+++ b/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/src/share/vm/memory/sharedHeap.hpp	Thu Feb 13 17:44:39 2014 +0100
+++ b/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