changeset 23222:8e83e6b768b8

8061630: G1 iterates over JNIHandles two times Reviewed-by: mgerdin, brutisso
author ehelin
date Thu, 23 Oct 2014 11:43:29 +0200
parents a9b72f566e9f
children 8f8f1d578796
files src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp
diffstat 1 files changed, 2 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp	Thu Aug 07 09:35:08 2014 +0200
+++ b/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp	Thu Oct 23 11:43:29 2014 +0200
@@ -5939,14 +5939,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);