8225706: JFR RootResolver resets CLD claims with no restore
authormgronlun
Tue, 02 Jul 2019 14:31:43 +0200
changeset 55564 7df7c1f71ccf
parent 55563 d56b192c73e9
child 55565 51b28beb53fd
8225706: JFR RootResolver resets CLD claims with no restore Reviewed-by: zgu, egahlin
src/hotspot/share/jfr/leakprofiler/chains/rootSetClosure.cpp
src/hotspot/share/jfr/leakprofiler/checkpoint/rootResolver.cpp
--- a/src/hotspot/share/jfr/leakprofiler/chains/rootSetClosure.cpp	Tue Jul 02 11:33:05 2019 +0200
+++ b/src/hotspot/share/jfr/leakprofiler/chains/rootSetClosure.cpp	Tue Jul 02 14:31:43 2019 +0200
@@ -30,7 +30,6 @@
 #include "gc/shared/strongRootsScope.hpp"
 #include "jfr/leakprofiler/chains/edgeQueue.hpp"
 #include "jfr/leakprofiler/chains/rootSetClosure.hpp"
-#include "jfr/leakprofiler/utilities/saveRestore.hpp"
 #include "jfr/leakprofiler/utilities/unifiedOop.hpp"
 #include "memory/universe.hpp"
 #include "oops/access.inline.hpp"
@@ -92,10 +91,9 @@
 };
 
 void RootSetClosure::process_roots(OopClosure* closure) {
-  SaveRestoreCLDClaimBits save_restore_cld_claim_bits;
   RootSetClosureMarkScope mark_scope;
 
-  CLDToOopClosure cldt_closure(closure, ClassLoaderData::_claim_strong);
+  CLDToOopClosure cldt_closure(closure, ClassLoaderData::_claim_none);
   ClassLoaderDataGraph::always_strong_cld_do(&cldt_closure);
   CodeBlobToOopClosure blobs(closure, false);
   Threads::oops_do(closure, &blobs);
--- a/src/hotspot/share/jfr/leakprofiler/checkpoint/rootResolver.cpp	Tue Jul 02 11:33:05 2019 +0200
+++ b/src/hotspot/share/jfr/leakprofiler/checkpoint/rootResolver.cpp	Tue Jul 02 14:31:43 2019 +0200
@@ -132,7 +132,7 @@
 bool ReferenceToRootClosure::do_cldg_roots() {
   assert(!complete(), "invariant");
   ReferenceLocateClosure rlc(_callback, OldObjectRoot::_class_loader_data, OldObjectRoot::_type_undetermined, NULL);
-  CLDToOopClosure cldt_closure(&rlc, ClassLoaderData::_claim_strong);
+  CLDToOopClosure cldt_closure(&rlc, ClassLoaderData::_claim_none);
   ClassLoaderDataGraph::always_strong_cld_do(&cldt_closure);
   return rlc.complete();
 }
@@ -435,9 +435,6 @@
 };
 
 void RootResolver::resolve(RootCallback& callback) {
-
-  // Need to clear cld claim bit before starting
-  ClassLoaderDataGraph::clear_claimed_marks();
   RootResolverMarkScope mark_scope;
 
   // thread local roots