< prev index next >

src/share/vm/memory/iterator.hpp

Print this page




 267 // Applies an oop closure to all ref fields in code blobs
 268 // iterated over in an object iteration.
 269 class CodeBlobToOopClosure : public CodeBlobClosure {
 270   OopClosure* _cl;
 271   bool _fix_relocations;
 272  protected:
 273   void do_nmethod(nmethod* nm);
 274  public:
 275   CodeBlobToOopClosure(OopClosure* cl, bool fix_relocations) : _cl(cl), _fix_relocations(fix_relocations) {}
 276   virtual void do_code_blob(CodeBlob* cb);
 277 
 278   const static bool FixRelocations = true;
 279 };
 280 
 281 class MarkingCodeBlobClosure : public CodeBlobToOopClosure {
 282  public:
 283   MarkingCodeBlobClosure(OopClosure* cl, bool fix_relocations) : CodeBlobToOopClosure(cl, fix_relocations) {}
 284   // Called for each code blob, but at most once per unique blob.
 285 
 286   virtual void do_code_blob(CodeBlob* cb);
 287 
 288   class MarkScope : public StackObj {
 289   protected:
 290     bool _active;
 291   public:
 292     MarkScope(bool activate = true);
 293       // = { if (active) nmethod::oops_do_marking_prologue(); }
 294     ~MarkScope();
 295       // = { if (active) nmethod::oops_do_marking_epilogue(); }
 296   };
 297 };
 298 
 299 // MonitorClosure is used for iterating over monitors in the monitors cache
 300 
 301 class ObjectMonitor;
 302 
 303 class MonitorClosure : public StackObj {
 304  public:
 305   // called for each monitor in cache
 306   virtual void do_monitor(ObjectMonitor* m) = 0;
 307 };
 308 
 309 // A closure that is applied without any arguments.
 310 class VoidClosure : public StackObj {
 311  public:
 312   // I would have liked to declare this a pure virtual, but that breaks
 313   // in mysterious ways, for unknown reasons.
 314   virtual void do_void();
 315 };
 316 




 267 // Applies an oop closure to all ref fields in code blobs
 268 // iterated over in an object iteration.
 269 class CodeBlobToOopClosure : public CodeBlobClosure {
 270   OopClosure* _cl;
 271   bool _fix_relocations;
 272  protected:
 273   void do_nmethod(nmethod* nm);
 274  public:
 275   CodeBlobToOopClosure(OopClosure* cl, bool fix_relocations) : _cl(cl), _fix_relocations(fix_relocations) {}
 276   virtual void do_code_blob(CodeBlob* cb);
 277 
 278   const static bool FixRelocations = true;
 279 };
 280 
 281 class MarkingCodeBlobClosure : public CodeBlobToOopClosure {
 282  public:
 283   MarkingCodeBlobClosure(OopClosure* cl, bool fix_relocations) : CodeBlobToOopClosure(cl, fix_relocations) {}
 284   // Called for each code blob, but at most once per unique blob.
 285 
 286   virtual void do_code_blob(CodeBlob* cb);










 287 };
 288 
 289 // MonitorClosure is used for iterating over monitors in the monitors cache
 290 
 291 class ObjectMonitor;
 292 
 293 class MonitorClosure : public StackObj {
 294  public:
 295   // called for each monitor in cache
 296   virtual void do_monitor(ObjectMonitor* m) = 0;
 297 };
 298 
 299 // A closure that is applied without any arguments.
 300 class VoidClosure : public StackObj {
 301  public:
 302   // I would have liked to declare this a pure virtual, but that breaks
 303   // in mysterious ways, for unknown reasons.
 304   virtual void do_void();
 305 };
 306 


< prev index next >