< prev index next >

src/hotspot/share/memory/iterator.hpp

Print this page




  98 
  99 #ifdef ASSERT
 100   // Default verification of each visited oop field.
 101   template <typename T> void verify(T* p);
 102 
 103   // Can be used by subclasses to turn off the default verification of oop fields.
 104   virtual bool should_verify_oops() { return true; }
 105 #endif
 106 };
 107 
 108 // An OopIterateClosure that can be used when there's no need to visit the Metadata.
 109 class BasicOopIterateClosure : public OopIterateClosure {
 110 public:
 111   BasicOopIterateClosure(ReferenceDiscoverer* rd = NULL) : OopIterateClosure(rd) {}
 112 
 113   virtual bool do_metadata() { return false; }
 114   virtual void do_klass(Klass* k) { ShouldNotReachHere(); }
 115   virtual void do_cld(ClassLoaderData* cld) { ShouldNotReachHere(); }
 116 };
 117 






 118 class KlassClosure : public Closure {
 119  public:
 120   virtual void do_klass(Klass* k) = 0;
 121 };
 122 
 123 class CLDClosure : public Closure {
 124  public:
 125   virtual void do_cld(ClassLoaderData* cld) = 0;
 126 };
 127 
 128 class MetadataClosure : public Closure {
 129  public:
 130   virtual void do_metadata(Metadata* md) = 0;
 131 };
 132 
 133 
 134 class CLDToOopClosure : public CLDClosure {
 135   OopClosure*       _oop_closure;
 136   int               _cld_claim;
 137 




  98 
  99 #ifdef ASSERT
 100   // Default verification of each visited oop field.
 101   template <typename T> void verify(T* p);
 102 
 103   // Can be used by subclasses to turn off the default verification of oop fields.
 104   virtual bool should_verify_oops() { return true; }
 105 #endif
 106 };
 107 
 108 // An OopIterateClosure that can be used when there's no need to visit the Metadata.
 109 class BasicOopIterateClosure : public OopIterateClosure {
 110 public:
 111   BasicOopIterateClosure(ReferenceDiscoverer* rd = NULL) : OopIterateClosure(rd) {}
 112 
 113   virtual bool do_metadata() { return false; }
 114   virtual void do_klass(Klass* k) { ShouldNotReachHere(); }
 115   virtual void do_cld(ClassLoaderData* cld) { ShouldNotReachHere(); }
 116 };
 117 
 118 class DerivedOopClosure : public Closure {
 119  public:
 120   enum { SkipNull = true };
 121   virtual void do_derived_oop(oop* base, oop* derived) = 0;
 122 };
 123 
 124 class KlassClosure : public Closure {
 125  public:
 126   virtual void do_klass(Klass* k) = 0;
 127 };
 128 
 129 class CLDClosure : public Closure {
 130  public:
 131   virtual void do_cld(ClassLoaderData* cld) = 0;
 132 };
 133 
 134 class MetadataClosure : public Closure {
 135  public:
 136   virtual void do_metadata(Metadata* md) = 0;
 137 };
 138 
 139 
 140 class CLDToOopClosure : public CLDClosure {
 141   OopClosure*       _oop_closure;
 142   int               _cld_claim;
 143 


< prev index next >