< prev index next >

src/share/vm/gc/cms/cmsOopClosures.hpp

Print this page




  49       do_oop(obj);                                        \
  50     }                                                     \
  51   }
  52 
  53 // TODO: This duplication of the MetadataAwareOopClosure class is only needed
  54 //       because some CMS OopClosures derive from OopsInGenClosure. It would be
  55 //       good to get rid of them completely.
  56 class MetadataAwareOopsInGenClosure: public OopsInGenClosure {
  57   KlassToOopClosure _klass_closure;
  58  public:
  59   MetadataAwareOopsInGenClosure() {
  60     _klass_closure.initialize(this);
  61   }
  62 
  63   virtual bool do_metadata()    { return do_metadata_nv(); }
  64   inline  bool do_metadata_nv() { return true; }
  65 
  66   virtual void do_klass(Klass* k);
  67   void do_klass_nv(Klass* k);
  68 
  69   virtual void do_class_loader_data(ClassLoaderData* cld);

  70 };
  71 
  72 class MarkRefsIntoClosure: public MetadataAwareOopsInGenClosure {
  73  private:
  74   const MemRegion _span;
  75   CMSBitMap*      _bitMap;
  76  protected:
  77   DO_OOP_WORK_DEFN
  78  public:
  79   MarkRefsIntoClosure(MemRegion span, CMSBitMap* bitMap);
  80   virtual void do_oop(oop* p);
  81   virtual void do_oop(narrowOop* p);
  82 };
  83 
  84 class Par_MarkRefsIntoClosure: public MetadataAwareOopsInGenClosure {
  85  private:
  86   const MemRegion _span;
  87   CMSBitMap*      _bitMap;
  88  protected:
  89   DO_OOP_WORK_DEFN




  49       do_oop(obj);                                        \
  50     }                                                     \
  51   }
  52 
  53 // TODO: This duplication of the MetadataAwareOopClosure class is only needed
  54 //       because some CMS OopClosures derive from OopsInGenClosure. It would be
  55 //       good to get rid of them completely.
  56 class MetadataAwareOopsInGenClosure: public OopsInGenClosure {
  57   KlassToOopClosure _klass_closure;
  58  public:
  59   MetadataAwareOopsInGenClosure() {
  60     _klass_closure.initialize(this);
  61   }
  62 
  63   virtual bool do_metadata()    { return do_metadata_nv(); }
  64   inline  bool do_metadata_nv() { return true; }
  65 
  66   virtual void do_klass(Klass* k);
  67   void do_klass_nv(Klass* k);
  68 
  69   virtual void do_cld(ClassLoaderData* cld) { do_cld_nv(cld); }
  70   void do_cld_nv(ClassLoaderData* cld);
  71 };
  72 
  73 class MarkRefsIntoClosure: public MetadataAwareOopsInGenClosure {
  74  private:
  75   const MemRegion _span;
  76   CMSBitMap*      _bitMap;
  77  protected:
  78   DO_OOP_WORK_DEFN
  79  public:
  80   MarkRefsIntoClosure(MemRegion span, CMSBitMap* bitMap);
  81   virtual void do_oop(oop* p);
  82   virtual void do_oop(narrowOop* p);
  83 };
  84 
  85 class Par_MarkRefsIntoClosure: public MetadataAwareOopsInGenClosure {
  86  private:
  87   const MemRegion _span;
  88   CMSBitMap*      _bitMap;
  89  protected:
  90   DO_OOP_WORK_DEFN


< prev index next >