< prev index next >

src/hotspot/share/gc/serial/markSweep.hpp

Print this page




  70   // Used for java/lang/ref handling
  71   class IsAliveClosure: public BoolObjectClosure {
  72    public:
  73     virtual bool do_object_b(oop p);
  74   };
  75 
  76   class KeepAliveClosure: public OopClosure {
  77    protected:
  78     template <class T> void do_oop_work(T* p);
  79    public:
  80     virtual void do_oop(oop* p);
  81     virtual void do_oop(narrowOop* p);
  82   };
  83 
  84   //
  85   // Friend decls
  86   //
  87   friend class AdjustPointerClosure;
  88   friend class KeepAliveClosure;
  89   friend class VM_MarkSweep;
  90   friend void marksweep_init();
  91 
  92   //
  93   // Vars
  94   //
  95  protected:
  96   // Total invocations of a MarkSweep collection
  97   static uint _total_invocations;
  98 
  99   // Traversal stacks used during phase1
 100   static Stack<oop, mtGC>                      _marking_stack;
 101   static Stack<ObjArrayTask, mtGC>             _objarray_stack;
 102 
 103   // Space for storing/restoring mark word
 104   static Stack<markOop, mtGC>                  _preserved_mark_stack;
 105   static Stack<oop, mtGC>                      _preserved_oop_stack;
 106   static size_t                          _preserved_count;
 107   static size_t                          _preserved_count_max;
 108   static PreservedMark*                  _preserved_marks;
 109 
 110   // Reference processing (used in ...follow_contents)
 111   static ReferenceProcessor*             _ref_processor;
 112 
 113   static STWGCTimer*                     _gc_timer;
 114   static SerialOldTracer*                _gc_tracer;
 115 
 116   // Non public closures
 117   static KeepAliveClosure keep_alive;
 118 
 119  public:


 120   // Public closures
 121   static IsAliveClosure       is_alive;
 122   static FollowRootClosure    follow_root_closure;
 123   static MarkAndPushClosure   mark_and_push_closure;
 124   static FollowStackClosure   follow_stack_closure;
 125   static CLDToOopClosure      follow_cld_closure;
 126   static AdjustPointerClosure adjust_pointer_closure;
 127   static CLDToOopClosure      adjust_cld_closure;
 128 
 129   // Accessors
 130   static uint total_invocations() { return _total_invocations; }
 131 
 132   // Reference Processing
 133   static ReferenceProcessor* const ref_processor() { return _ref_processor; }
 134   static void set_ref_processor(ReferenceProcessor* rp);
 135 
 136   static STWGCTimer* gc_timer() { return _gc_timer; }
 137   static SerialOldTracer* gc_tracer() { return _gc_tracer; }
 138 
 139   static void preserve_mark(oop p, markOop mark);




  70   // Used for java/lang/ref handling
  71   class IsAliveClosure: public BoolObjectClosure {
  72    public:
  73     virtual bool do_object_b(oop p);
  74   };
  75 
  76   class KeepAliveClosure: public OopClosure {
  77    protected:
  78     template <class T> void do_oop_work(T* p);
  79    public:
  80     virtual void do_oop(oop* p);
  81     virtual void do_oop(narrowOop* p);
  82   };
  83 
  84   //
  85   // Friend decls
  86   //
  87   friend class AdjustPointerClosure;
  88   friend class KeepAliveClosure;
  89   friend class VM_MarkSweep;

  90 
  91   //
  92   // Vars
  93   //
  94  protected:
  95   // Total invocations of a MarkSweep collection
  96   static uint _total_invocations;
  97 
  98   // Traversal stacks used during phase1
  99   static Stack<oop, mtGC>                      _marking_stack;
 100   static Stack<ObjArrayTask, mtGC>             _objarray_stack;
 101 
 102   // Space for storing/restoring mark word
 103   static Stack<markOop, mtGC>                  _preserved_mark_stack;
 104   static Stack<oop, mtGC>                      _preserved_oop_stack;
 105   static size_t                          _preserved_count;
 106   static size_t                          _preserved_count_max;
 107   static PreservedMark*                  _preserved_marks;
 108 
 109   // Reference processing (used in ...follow_contents)
 110   static ReferenceProcessor*             _ref_processor;
 111 
 112   static STWGCTimer*                     _gc_timer;
 113   static SerialOldTracer*                _gc_tracer;
 114 
 115   // Non public closures
 116   static KeepAliveClosure keep_alive;
 117 
 118  public:
 119   static void initialize();
 120 
 121   // Public closures
 122   static IsAliveClosure       is_alive;
 123   static FollowRootClosure    follow_root_closure;
 124   static MarkAndPushClosure   mark_and_push_closure;
 125   static FollowStackClosure   follow_stack_closure;
 126   static CLDToOopClosure      follow_cld_closure;
 127   static AdjustPointerClosure adjust_pointer_closure;
 128   static CLDToOopClosure      adjust_cld_closure;
 129 
 130   // Accessors
 131   static uint total_invocations() { return _total_invocations; }
 132 
 133   // Reference Processing
 134   static ReferenceProcessor* const ref_processor() { return _ref_processor; }
 135   static void set_ref_processor(ReferenceProcessor* rp);
 136 
 137   static STWGCTimer* gc_timer() { return _gc_timer; }
 138   static SerialOldTracer* gc_tracer() { return _gc_tracer; }
 139 
 140   static void preserve_mark(oop p, markOop mark);


< prev index next >