src/hotspot/share/gc/g1/g1DirtyCardQueue.hpp
changeset 57969 6f0215981777
parent 57955 18863bf3501f
child 58033 9162feb63c42
equal deleted inserted replaced
57967:481a6a3449c8 57969:6f0215981777
    23  */
    23  */
    24 
    24 
    25 #ifndef SHARE_GC_G1_G1DIRTYCARDQUEUE_HPP
    25 #ifndef SHARE_GC_G1_G1DIRTYCARDQUEUE_HPP
    26 #define SHARE_GC_G1_G1DIRTYCARDQUEUE_HPP
    26 #define SHARE_GC_G1_G1DIRTYCARDQUEUE_HPP
    27 
    27 
       
    28 #include "gc/g1/g1FreeIdSet.hpp"
    28 #include "gc/shared/ptrQueue.hpp"
    29 #include "gc/shared/ptrQueue.hpp"
    29 #include "memory/allocation.hpp"
    30 #include "memory/allocation.hpp"
    30 
    31 
    31 class G1CardTableEntryClosure;
    32 class G1CardTableEntryClosure;
    32 class G1DirtyCardQueueSet;
    33 class G1DirtyCardQueueSet;
    33 class G1FreeIdSet;
       
    34 class G1RedirtyCardsQueueSet;
    34 class G1RedirtyCardsQueueSet;
    35 class Thread;
    35 class Thread;
    36 class Monitor;
    36 class Monitor;
    37 
    37 
    38 // A ptrQueue whose elements are "oops", pointers to object heads.
    38 // A ptrQueue whose elements are "oops", pointers to object heads.
   113   // mutator must start doing some of the concurrent refinement work.
   113   // mutator must start doing some of the concurrent refinement work.
   114   size_t _max_cards;
   114   size_t _max_cards;
   115   size_t _max_cards_padding;
   115   size_t _max_cards_padding;
   116   static const size_t MaxCardsUnlimited = SIZE_MAX;
   116   static const size_t MaxCardsUnlimited = SIZE_MAX;
   117 
   117 
   118   G1FreeIdSet* _free_ids;
   118   G1FreeIdSet _free_ids;
   119 
   119 
   120   // The number of completed buffers processed by mutator and rs thread,
   120   // The number of completed buffers processed by mutator and rs thread,
   121   // respectively.
   121   // respectively.
   122   jint _processed_buffers_mut;
   122   jint _processed_buffers_mut;
   123   jint _processed_buffers_rs_thread;
   123   jint _processed_buffers_rs_thread;
   124 
   124 
   125 public:
   125 public:
   126   G1DirtyCardQueueSet();
   126   G1DirtyCardQueueSet();
   127   ~G1DirtyCardQueueSet();
   127   ~G1DirtyCardQueueSet();
   128 
   128 
   129   void initialize(Monitor* cbl_mon,
   129   void initialize(Monitor* cbl_mon, BufferNode::Allocator* allocator);
   130                   BufferNode::Allocator* allocator,
       
   131                   bool init_free_ids = false);
       
   132 
   130 
   133   // The number of parallel ids that can be claimed to allow collector or
   131   // The number of parallel ids that can be claimed to allow collector or
   134   // mutator threads to do card-processing work.
   132   // mutator threads to do card-processing work.
   135   static uint num_par_ids();
   133   static uint num_par_ids();
   136 
   134