< prev index next >

src/hotspot/share/gc/z/zVerify.cpp

Print this page

186       ClaimMetadataVisitingOopIterateClosure(ClassLoaderData::_claim_other),
187       _verify_weaks(verify_weaks) {}
188 
189   virtual void do_oop(oop* p) {
190     if (_verify_weaks) {
191       z_verify_possibly_weak_oop(p);
192     } else {
193       // We should never encounter finalizable oops through strong
194       // paths. This assumes we have only visited strong roots.
195       z_verify_oop(p);
196     }
197   }
198 
199   virtual void do_oop(narrowOop* p) {
200     ShouldNotReachHere();
201   }
202 
203   virtual ReferenceIterationMode reference_iteration_mode() {
204     return _verify_weaks ? DO_FIELDS : DO_FIELDS_EXCEPT_REFERENT;
205   }



206 };
207 
208 typedef ClaimingCLDToOopClosure<ClassLoaderData::_claim_none> ZVerifyCLDClosure;
209 
210 class ZVerifyThreadClosure : public ThreadClosure {
211 private:
212   ZVerifyRootClosure* const _cl;
213 
214 public:
215   ZVerifyThreadClosure(ZVerifyRootClosure* cl) :
216       _cl(cl) {}
217 
218   virtual void do_thread(Thread* thread) {
219     thread->oops_do_no_frames(_cl, NULL);
220 
221     JavaThread* const jt = JavaThread::cast(thread);
222     if (!jt->has_last_Java_frame()) {
223       return;
224     }
225 

186       ClaimMetadataVisitingOopIterateClosure(ClassLoaderData::_claim_other),
187       _verify_weaks(verify_weaks) {}
188 
189   virtual void do_oop(oop* p) {
190     if (_verify_weaks) {
191       z_verify_possibly_weak_oop(p);
192     } else {
193       // We should never encounter finalizable oops through strong
194       // paths. This assumes we have only visited strong roots.
195       z_verify_oop(p);
196     }
197   }
198 
199   virtual void do_oop(narrowOop* p) {
200     ShouldNotReachHere();
201   }
202 
203   virtual ReferenceIterationMode reference_iteration_mode() {
204     return _verify_weaks ? DO_FIELDS : DO_FIELDS_EXCEPT_REFERENT;
205   }
206 
207   virtual void do_method(Method* m) {}
208   virtual void do_nmethod(nmethod* nm) {}
209 };
210 
211 typedef ClaimingCLDToOopClosure<ClassLoaderData::_claim_none> ZVerifyCLDClosure;
212 
213 class ZVerifyThreadClosure : public ThreadClosure {
214 private:
215   ZVerifyRootClosure* const _cl;
216 
217 public:
218   ZVerifyThreadClosure(ZVerifyRootClosure* cl) :
219       _cl(cl) {}
220 
221   virtual void do_thread(Thread* thread) {
222     thread->oops_do_no_frames(_cl, NULL);
223 
224     JavaThread* const jt = JavaThread::cast(thread);
225     if (!jt->has_last_Java_frame()) {
226       return;
227     }
228 
< prev index next >