102 bool mut_process_buffer(BufferNode* node);
103
104 // Protected by the _cbl_mon.
105 FreeIdSet* _free_ids;
106
107 // The number of completed buffers processed by mutator and rs thread,
108 // respectively.
109 jint _processed_buffers_mut;
110 jint _processed_buffers_rs_thread;
111
112 // Current buffer node used for parallel iteration.
113 BufferNode* volatile _cur_par_buffer_node;
114
115 void concatenate_log(DirtyCardQueue& dcq);
116
117 public:
118 DirtyCardQueueSet(bool notify_when_complete = true);
119
120 void initialize(Monitor* cbl_mon,
121 BufferNode::Allocator* allocator,
122 int process_completed_threshold,
123 int max_completed_queue,
124 Mutex* lock,
125 bool init_free_ids = false);
126
127 // The number of parallel ids that can be claimed to allow collector or
128 // mutator threads to do card-processing work.
129 static uint num_par_ids();
130
131 static void handle_zero_index_for_thread(JavaThread* t);
132
133 // Apply G1RefineCardConcurrentlyClosure to completed buffers until there are stop_at
134 // completed buffers remaining.
135 bool refine_completed_buffer_concurrently(uint worker_i, size_t stop_at);
136
137 // Apply the given closure to all completed buffers. The given closure's do_card_ptr
138 // must never return false. Must only be called during GC.
139 bool apply_closure_during_gc(CardTableEntryClosure* cl, uint worker_i);
140
141 BufferNode* get_completed_buffer(size_t stop_at);
142
143 void reset_for_par_iteration() { _cur_par_buffer_node = _completed_buffers_head; }
|
102 bool mut_process_buffer(BufferNode* node);
103
104 // Protected by the _cbl_mon.
105 FreeIdSet* _free_ids;
106
107 // The number of completed buffers processed by mutator and rs thread,
108 // respectively.
109 jint _processed_buffers_mut;
110 jint _processed_buffers_rs_thread;
111
112 // Current buffer node used for parallel iteration.
113 BufferNode* volatile _cur_par_buffer_node;
114
115 void concatenate_log(DirtyCardQueue& dcq);
116
117 public:
118 DirtyCardQueueSet(bool notify_when_complete = true);
119
120 void initialize(Monitor* cbl_mon,
121 BufferNode::Allocator* allocator,
122 Mutex* lock,
123 bool init_free_ids = false);
124
125 // The number of parallel ids that can be claimed to allow collector or
126 // mutator threads to do card-processing work.
127 static uint num_par_ids();
128
129 static void handle_zero_index_for_thread(JavaThread* t);
130
131 // Apply G1RefineCardConcurrentlyClosure to completed buffers until there are stop_at
132 // completed buffers remaining.
133 bool refine_completed_buffer_concurrently(uint worker_i, size_t stop_at);
134
135 // Apply the given closure to all completed buffers. The given closure's do_card_ptr
136 // must never return false. Must only be called during GC.
137 bool apply_closure_during_gc(CardTableEntryClosure* cl, uint worker_i);
138
139 BufferNode* get_completed_buffer(size_t stop_at);
140
141 void reset_for_par_iteration() { _cur_par_buffer_node = _completed_buffers_head; }
|