< prev index next >

src/share/vm/gc/shared/genOopClosures.hpp

Print this page
rev 9847 : 8146395: Add inline qualifier in oop.hpp and fix inlining in gc files
Summary: Fix remaining issues after 8146401


 129   virtual void do_oop(narrowOop* p);
 130   inline void do_oop_nv(oop* p);
 131   inline void do_oop_nv(narrowOop* p);
 132 };
 133 
 134 class KlassScanClosure: public KlassClosure {
 135   OopsInKlassOrGenClosure* _scavenge_closure;
 136   // true if the the modified oops state should be saved.
 137   bool                     _accumulate_modified_oops;
 138  public:
 139   KlassScanClosure(OopsInKlassOrGenClosure* scavenge_closure,
 140                    KlassRemSet* klass_rem_set_policy);
 141   void do_klass(Klass* k);
 142 };
 143 
 144 class FilteringClosure: public ExtendedOopClosure {
 145  private:
 146   HeapWord*   _boundary;
 147   ExtendedOopClosure* _cl;
 148  protected:
 149   template <class T> inline void do_oop_work(T* p) {
 150     T heap_oop = oopDesc::load_heap_oop(p);
 151     if (!oopDesc::is_null(heap_oop)) {
 152       oop obj = oopDesc::decode_heap_oop_not_null(heap_oop);
 153       if ((HeapWord*)obj < _boundary) {
 154         _cl->do_oop(p);
 155       }
 156     }
 157   }
 158  public:
 159   FilteringClosure(HeapWord* boundary, ExtendedOopClosure* cl) :
 160     ExtendedOopClosure(cl->ref_processor()), _boundary(boundary),
 161     _cl(cl) {}
 162   virtual void do_oop(oop* p);
 163   virtual void do_oop(narrowOop* p);
 164   inline void do_oop_nv(oop* p)       { FilteringClosure::do_oop_work(p); }
 165   inline void do_oop_nv(narrowOop* p) { FilteringClosure::do_oop_work(p); }
 166   virtual bool do_metadata()          { return do_metadata_nv(); }
 167   inline bool do_metadata_nv()        { assert(!_cl->do_metadata(), "assumption broken, must change to 'return _cl->do_metadata()'"); return false; }
 168 };
 169 
 170 // Closure for scanning DefNewGeneration's weak references.
 171 // NOTE: very much like ScanClosure but not derived from
 172 //  OopsInGenClosure -- weak references are processed all
 173 //  at once, with no notion of which generation they were in.
 174 class ScanWeakRefClosure: public OopClosure {
 175  protected:
 176   DefNewGeneration* _g;
 177   HeapWord*         _boundary;
 178   template <class T> inline void do_oop_work(T* p);
 179  public:
 180   ScanWeakRefClosure(DefNewGeneration* g);
 181   virtual void do_oop(oop* p);
 182   virtual void do_oop(narrowOop* p);
 183   inline void do_oop_nv(oop* p);
 184   inline void do_oop_nv(narrowOop* p);
 185 };


 129   virtual void do_oop(narrowOop* p);
 130   inline void do_oop_nv(oop* p);
 131   inline void do_oop_nv(narrowOop* p);
 132 };
 133 
 134 class KlassScanClosure: public KlassClosure {
 135   OopsInKlassOrGenClosure* _scavenge_closure;
 136   // true if the the modified oops state should be saved.
 137   bool                     _accumulate_modified_oops;
 138  public:
 139   KlassScanClosure(OopsInKlassOrGenClosure* scavenge_closure,
 140                    KlassRemSet* klass_rem_set_policy);
 141   void do_klass(Klass* k);
 142 };
 143 
 144 class FilteringClosure: public ExtendedOopClosure {
 145  private:
 146   HeapWord*   _boundary;
 147   ExtendedOopClosure* _cl;
 148  protected:
 149   template <class T> inline void do_oop_work(T* p);








 150  public:
 151   FilteringClosure(HeapWord* boundary, ExtendedOopClosure* cl) :
 152     ExtendedOopClosure(cl->ref_processor()), _boundary(boundary),
 153     _cl(cl) {}
 154   virtual void do_oop(oop* p);
 155   virtual void do_oop(narrowOop* p);
 156   inline void do_oop_nv(oop* p);
 157   inline void do_oop_nv(narrowOop* p);
 158   virtual bool do_metadata()          { return do_metadata_nv(); }
 159   inline bool do_metadata_nv()        { assert(!_cl->do_metadata(), "assumption broken, must change to 'return _cl->do_metadata()'"); return false; }
 160 };
 161 
 162 // Closure for scanning DefNewGeneration's weak references.
 163 // NOTE: very much like ScanClosure but not derived from
 164 //  OopsInGenClosure -- weak references are processed all
 165 //  at once, with no notion of which generation they were in.
 166 class ScanWeakRefClosure: public OopClosure {
 167  protected:
 168   DefNewGeneration* _g;
 169   HeapWord*         _boundary;
 170   template <class T> inline void do_oop_work(T* p);
 171  public:
 172   ScanWeakRefClosure(DefNewGeneration* g);
 173   virtual void do_oop(oop* p);
 174   virtual void do_oop(narrowOop* p);
 175   inline void do_oop_nv(oop* p);
 176   inline void do_oop_nv(narrowOop* p);
 177 };
< prev index next >