src/hotspot/share/memory/iterator.hpp
changeset 55603 3868dde58ebb
parent 55251 92eec0732eed
child 58679 9c3209ff7550
child 59154 0c2e1808f800
--- a/src/hotspot/share/memory/iterator.hpp	Tue Jul 02 12:24:26 2019 +0200
+++ b/src/hotspot/share/memory/iterator.hpp	Mon Jun 10 13:04:12 2019 +0200
@@ -144,18 +144,28 @@
   void do_cld(ClassLoaderData* cld);
 };
 
-// The base class for all concurrent marking closures,
-// that participates in class unloading.
-// It's used to proxy through the metadata to the oops defined in them.
-class MetadataVisitingOopIterateClosure: public OopIterateClosure {
+class ClaimMetadataVisitingOopIterateClosure : public OopIterateClosure {
+ protected:
+  const int _claim;
+
  public:
-  MetadataVisitingOopIterateClosure(ReferenceDiscoverer* rd = NULL) : OopIterateClosure(rd) { }
+  ClaimMetadataVisitingOopIterateClosure(int claim, ReferenceDiscoverer* rd = NULL) :
+      OopIterateClosure(rd),
+      _claim(claim) { }
 
   virtual bool do_metadata() { return true; }
   virtual void do_klass(Klass* k);
   virtual void do_cld(ClassLoaderData* cld);
 };
 
+// The base class for all concurrent marking closures,
+// that participates in class unloading.
+// It's used to proxy through the metadata to the oops defined in them.
+class MetadataVisitingOopIterateClosure: public ClaimMetadataVisitingOopIterateClosure {
+ public:
+  MetadataVisitingOopIterateClosure(ReferenceDiscoverer* rd = NULL);
+};
+
 // ObjectClosure is used for iterating through an object space
 
 class ObjectClosure : public Closure {