hotspot/src/share/vm/gc_implementation/g1/satbQueue.hpp
changeset 6768 71338ecb7813
parent 5547 f4b087cbb361
child 7397 5b173b4ca846
equal deleted inserted replaced
6767:476e988061bb 6768:71338ecb7813
    27 
    27 
    28 // A ptrQueue whose elements are "oops", pointers to object heads.
    28 // A ptrQueue whose elements are "oops", pointers to object heads.
    29 class ObjPtrQueue: public PtrQueue {
    29 class ObjPtrQueue: public PtrQueue {
    30 public:
    30 public:
    31   ObjPtrQueue(PtrQueueSet* qset_, bool perm = false) :
    31   ObjPtrQueue(PtrQueueSet* qset_, bool perm = false) :
    32     PtrQueue(qset_, perm, qset_->is_active()) { }
    32     // SATB queues are only active during marking cycles. We create
       
    33     // them with their active field set to false. If a thread is
       
    34     // created during a cycle and its SATB queue needs to be activated
       
    35     // before the thread starts running, we'll need to set its active
       
    36     // field to true. This is done in JavaThread::initialize_queues().
       
    37     PtrQueue(qset_, perm, false /* active */) { }
    33   // Apply the closure to all elements, and reset the index to make the
    38   // Apply the closure to all elements, and reset the index to make the
    34   // buffer empty.
    39   // buffer empty.
    35   void apply_closure(ObjectClosure* cl);
    40   void apply_closure(ObjectClosure* cl);
    36 
    41 
    37   // Apply the closure to all elements of "buf", down to "index" (inclusive.)
    42   // Apply the closure to all elements of "buf", down to "index" (inclusive.)