src/share/vm/gc_implementation/g1/satbQueue.hpp

Print this page
rev 7653 : 8068883: Remove disabling of warning "C4355: 'this' : used in base member initializer list"


  35 class ObjPtrQueue: public PtrQueue {
  36   friend class Threads;
  37   friend class SATBMarkQueueSet;
  38   friend class G1RemarkThreadsClosure;
  39 
  40 private:
  41   // Filter out unwanted entries from the buffer.
  42   void filter();
  43 
  44   // Apply the closure to all elements.
  45   void apply_closure(ObjectClosure* cl);
  46 
  47   // Apply the closure to all elements and empty the buffer;
  48   void apply_closure_and_empty(ObjectClosure* cl);
  49 
  50   // Apply the closure to all elements of "buf", down to "index" (inclusive.)
  51   static void apply_closure_to_buffer(ObjectClosure* cl,
  52                                       void** buf, size_t index, size_t sz);
  53 
  54 public:

  55   ObjPtrQueue(PtrQueueSet* qset, bool perm = false) :
  56     // SATB queues are only active during marking cycles. We create
  57     // them with their active field set to false. If a thread is
  58     // created during a cycle and its SATB queue needs to be activated
  59     // before the thread starts running, we'll need to set its active
  60     // field to true. This is done in JavaThread::initialize_queues().
  61     PtrQueue(qset, perm, false /* active */) { }
  62 
  63   // Overrides PtrQueue::flush() so that it can filter the buffer
  64   // before it is flushed.
  65   virtual void flush();
  66 
  67   // Overrides PtrQueue::should_enqueue_buffer(). See the method's
  68   // definition for more information.
  69   virtual bool should_enqueue_buffer();
  70 
  71 #ifndef PRODUCT
  72   // Helpful for debugging
  73   void print(const char* name);
  74   static void print(const char* name, void** buf, size_t index, size_t sz);




  35 class ObjPtrQueue: public PtrQueue {
  36   friend class Threads;
  37   friend class SATBMarkQueueSet;
  38   friend class G1RemarkThreadsClosure;
  39 
  40 private:
  41   // Filter out unwanted entries from the buffer.
  42   void filter();
  43 
  44   // Apply the closure to all elements.
  45   void apply_closure(ObjectClosure* cl);
  46 
  47   // Apply the closure to all elements and empty the buffer;
  48   void apply_closure_and_empty(ObjectClosure* cl);
  49 
  50   // Apply the closure to all elements of "buf", down to "index" (inclusive.)
  51   static void apply_closure_to_buffer(ObjectClosure* cl,
  52                                       void** buf, size_t index, size_t sz);
  53 
  54 public:
  55   ObjPtrQueue() {}
  56   ObjPtrQueue(PtrQueueSet* qset, bool perm = false) :
  57     // SATB queues are only active during marking cycles. We create
  58     // them with their active field set to false. If a thread is
  59     // created during a cycle and its SATB queue needs to be activated
  60     // before the thread starts running, we'll need to set its active
  61     // field to true. This is done in JavaThread::initialize_queues().
  62     PtrQueue(qset, perm, false /* active */) { }
  63 
  64   // Overrides PtrQueue::flush() so that it can filter the buffer
  65   // before it is flushed.
  66   virtual void flush();
  67 
  68   // Overrides PtrQueue::should_enqueue_buffer(). See the method's
  69   // definition for more information.
  70   virtual bool should_enqueue_buffer();
  71 
  72 #ifndef PRODUCT
  73   // Helpful for debugging
  74   void print(const char* name);
  75   static void print(const char* name, void** buf, size_t index, size_t sz);