src/share/vm/memory/genOopClosures.hpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File hotspot Sdiff src/share/vm/memory

src/share/vm/memory/genOopClosures.hpp

Print this page




 176 // NOTE: very much like ScanClosure but not derived from
 177 //  OopsInGenClosure -- weak references are processed all
 178 //  at once, with no notion of which generation they were in.
 179 class ScanWeakRefClosure: public OopClosure {
 180  protected:
 181   DefNewGeneration* _g;
 182   HeapWord*         _boundary;
 183   template <class T> inline void do_oop_work(T* p);
 184  public:
 185   ScanWeakRefClosure(DefNewGeneration* g);
 186   virtual void do_oop(oop* p);
 187   virtual void do_oop(narrowOop* p);
 188   inline void do_oop_nv(oop* p);
 189   inline void do_oop_nv(narrowOop* p);
 190 };
 191 
 192 class VerifyOopClosure: public OopClosure {
 193  protected:
 194   template <class T> inline void do_oop_work(T* p) {
 195     oop obj = oopDesc::load_decode_heap_oop(p);
 196     guarantee(obj->is_oop_or_null(), err_msg("invalid oop: " INTPTR_FORMAT, (oopDesc*) obj));
 197   }
 198  public:
 199   virtual void do_oop(oop* p);
 200   virtual void do_oop(narrowOop* p);
 201   static VerifyOopClosure verify_oop;
 202 };
 203 
 204 #endif // SHARE_VM_MEMORY_GENOOPCLOSURES_HPP


 176 // NOTE: very much like ScanClosure but not derived from
 177 //  OopsInGenClosure -- weak references are processed all
 178 //  at once, with no notion of which generation they were in.
 179 class ScanWeakRefClosure: public OopClosure {
 180  protected:
 181   DefNewGeneration* _g;
 182   HeapWord*         _boundary;
 183   template <class T> inline void do_oop_work(T* p);
 184  public:
 185   ScanWeakRefClosure(DefNewGeneration* g);
 186   virtual void do_oop(oop* p);
 187   virtual void do_oop(narrowOop* p);
 188   inline void do_oop_nv(oop* p);
 189   inline void do_oop_nv(narrowOop* p);
 190 };
 191 
 192 class VerifyOopClosure: public OopClosure {
 193  protected:
 194   template <class T> inline void do_oop_work(T* p) {
 195     oop obj = oopDesc::load_decode_heap_oop(p);
 196     guarantee(obj->is_oop_or_null(), err_msg("invalid oop: " INTPTR_FORMAT, p2i((oopDesc*) obj)));
 197   }
 198  public:
 199   virtual void do_oop(oop* p);
 200   virtual void do_oop(narrowOop* p);
 201   static VerifyOopClosure verify_oop;
 202 };
 203 
 204 #endif // SHARE_VM_MEMORY_GENOOPCLOSURES_HPP
src/share/vm/memory/genOopClosures.hpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File