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

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


  25 #ifndef SHARE_VM_GC_IMPLEMENTATION_G1_DIRTYCARDQUEUE_HPP
  26 #define SHARE_VM_GC_IMPLEMENTATION_G1_DIRTYCARDQUEUE_HPP
  27 
  28 #include "gc_implementation/g1/ptrQueue.hpp"
  29 #include "memory/allocation.hpp"
  30 
  31 class FreeIdSet;
  32 
  33 // A closure class for processing card table entries.  Note that we don't
  34 // require these closure objects to be stack-allocated.
  35 class CardTableEntryClosure: public CHeapObj<mtGC> {
  36 public:
  37   // Process the card whose card table entry is "card_ptr".  If returns
  38   // "false", terminate the iteration early.
  39   virtual bool do_card_ptr(jbyte* card_ptr, uint worker_i = 0) = 0;
  40 };
  41 
  42 // A ptrQueue whose elements are "oops", pointers to object heads.
  43 class DirtyCardQueue: public PtrQueue {
  44 public:

  45   DirtyCardQueue(PtrQueueSet* qset_, bool perm = false) :
  46     // Dirty card queues are always active, so we create them with their
  47     // active field set to true.
  48     PtrQueue(qset_, perm, true /* active */) { }
  49 
  50   // Apply the closure to all elements, and reset the index to make the
  51   // buffer empty.  If a closure application returns "false", return
  52   // "false" immediately, halting the iteration.  If "consume" is true,
  53   // deletes processed entries from logs.
  54   bool apply_closure(CardTableEntryClosure* cl,
  55                      bool consume = true,
  56                      uint worker_i = 0);
  57 
  58   // Apply the closure to all elements of "buf", down to "index"
  59   // (inclusive.)  If returns "false", then a closure application returned
  60   // "false", and we return immediately.  If "consume" is true, entries are
  61   // set to NULL as they are processed, so they will not be processed again
  62   // later.
  63   static bool apply_closure_to_buffer(CardTableEntryClosure* cl,
  64                                       void** buf, size_t index, size_t sz,




  25 #ifndef SHARE_VM_GC_IMPLEMENTATION_G1_DIRTYCARDQUEUE_HPP
  26 #define SHARE_VM_GC_IMPLEMENTATION_G1_DIRTYCARDQUEUE_HPP
  27 
  28 #include "gc_implementation/g1/ptrQueue.hpp"
  29 #include "memory/allocation.hpp"
  30 
  31 class FreeIdSet;
  32 
  33 // A closure class for processing card table entries.  Note that we don't
  34 // require these closure objects to be stack-allocated.
  35 class CardTableEntryClosure: public CHeapObj<mtGC> {
  36 public:
  37   // Process the card whose card table entry is "card_ptr".  If returns
  38   // "false", terminate the iteration early.
  39   virtual bool do_card_ptr(jbyte* card_ptr, uint worker_i = 0) = 0;
  40 };
  41 
  42 // A ptrQueue whose elements are "oops", pointers to object heads.
  43 class DirtyCardQueue: public PtrQueue {
  44 public:
  45   DirtyCardQueue() { }
  46   DirtyCardQueue(PtrQueueSet* qset_, bool perm = false) :
  47     // Dirty card queues are always active, so we create them with their
  48     // active field set to true.
  49     PtrQueue(qset_, perm, true /* active */) { }
  50 
  51   // Apply the closure to all elements, and reset the index to make the
  52   // buffer empty.  If a closure application returns "false", return
  53   // "false" immediately, halting the iteration.  If "consume" is true,
  54   // deletes processed entries from logs.
  55   bool apply_closure(CardTableEntryClosure* cl,
  56                      bool consume = true,
  57                      uint worker_i = 0);
  58 
  59   // Apply the closure to all elements of "buf", down to "index"
  60   // (inclusive.)  If returns "false", then a closure application returned
  61   // "false", and we return immediately.  If "consume" is true, entries are
  62   // set to NULL as they are processed, so they will not be processed again
  63   // later.
  64   static bool apply_closure_to_buffer(CardTableEntryClosure* cl,
  65                                       void** buf, size_t index, size_t sz,