From ae57b8ba9b75167df5cdcb2cf6f455ec66de25b4 Mon Sep 17 00:00:00 2001 From: ehelin Date: Thu, 23 Oct 2014 11:43:29 +0200 Subject: [PATCH] 8061630: G1 iterates over JNIHandles two times Reviewed-by: mgerdin, brutisso --- src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp b/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp index c3e623cdb..dfcb2c20b 100644 --- a/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp +++ b/src/share/vm/gc_implementation/g1/g1CollectedHeap.cpp @@ -5900,14 +5900,10 @@ void G1CollectedHeap::evacuate_collection_set(EvacuationInfo& evacuation_info) { // 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); -- GitLab