8061630: G1 iterates over JNIHandles two times
authorehelin
Thu, 23 Oct 2014 11:43:29 +0200
changeset 27437 68a6992ef996
parent 27252 9703e3f1f92a
child 27438 6777f21bb53f
child 27439 c0c3c18318be
child 27440 0408dd2544e7
8061630: G1 iterates over JNIHandles two times Reviewed-by: mgerdin, brutisso
hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp
--- a/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp	Wed Oct 22 16:40:43 2014 +0200
+++ b/hotspot/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp	Thu Oct 23 11:43:29 2014 +0200
@@ -5760,14 +5760,10 @@
   // not copied during the pause.
   process_discovered_references(n_workers);
 
-  // Weak root processing.
-  {
+  if (G1StringDedup::is_enabled()) {
     G1STWIsAliveClosure is_alive(this);
     G1KeepAliveClosure keep_alive(this);
-    JNIHandles::weak_oops_do(&is_alive, &keep_alive);
-    if (G1StringDedup::is_enabled()) {
-      G1StringDedup::unlink_or_oops_do(&is_alive, &keep_alive);
-    }
+    G1StringDedup::unlink_or_oops_do(&is_alive, &keep_alive);
   }
 
   _allocator->release_gc_alloc_regions(n_workers, evacuation_info);