142 _cld_claim(cld_claim) {} |
142 _cld_claim(cld_claim) {} |
143 |
143 |
144 void do_cld(ClassLoaderData* cld); |
144 void do_cld(ClassLoaderData* cld); |
145 }; |
145 }; |
146 |
146 |
|
147 class ClaimMetadataVisitingOopIterateClosure : public OopIterateClosure { |
|
148 protected: |
|
149 const int _claim; |
|
150 |
|
151 public: |
|
152 ClaimMetadataVisitingOopIterateClosure(int claim, ReferenceDiscoverer* rd = NULL) : |
|
153 OopIterateClosure(rd), |
|
154 _claim(claim) { } |
|
155 |
|
156 virtual bool do_metadata() { return true; } |
|
157 virtual void do_klass(Klass* k); |
|
158 virtual void do_cld(ClassLoaderData* cld); |
|
159 }; |
|
160 |
147 // The base class for all concurrent marking closures, |
161 // The base class for all concurrent marking closures, |
148 // that participates in class unloading. |
162 // that participates in class unloading. |
149 // It's used to proxy through the metadata to the oops defined in them. |
163 // It's used to proxy through the metadata to the oops defined in them. |
150 class MetadataVisitingOopIterateClosure: public OopIterateClosure { |
164 class MetadataVisitingOopIterateClosure: public ClaimMetadataVisitingOopIterateClosure { |
151 public: |
165 public: |
152 MetadataVisitingOopIterateClosure(ReferenceDiscoverer* rd = NULL) : OopIterateClosure(rd) { } |
166 MetadataVisitingOopIterateClosure(ReferenceDiscoverer* rd = NULL); |
153 |
|
154 virtual bool do_metadata() { return true; } |
|
155 virtual void do_klass(Klass* k); |
|
156 virtual void do_cld(ClassLoaderData* cld); |
|
157 }; |
167 }; |
158 |
168 |
159 // ObjectClosure is used for iterating through an object space |
169 // ObjectClosure is used for iterating through an object space |
160 |
170 |
161 class ObjectClosure : public Closure { |
171 class ObjectClosure : public Closure { |