93 class SATBMarkQueueSet: public PtrQueueSet {
94 SATBMarkQueue _shared_satb_queue;
95 size_t _buffer_enqueue_threshold;
96
97 #ifdef ASSERT
98 void dump_active_states(bool expected_active);
99 void verify_active_states(bool expected_active);
100 #endif // ASSERT
101
102 protected:
103 SATBMarkQueueSet();
104 ~SATBMarkQueueSet() {}
105
106 template<typename Filter>
107 void apply_filter(Filter filter, SATBMarkQueue* queue) {
108 queue->apply_filter(filter);
109 }
110
111 void initialize(Monitor* cbl_mon,
112 BufferNode::Allocator* allocator,
113 int process_completed_threshold,
114 uint buffer_enqueue_threshold_percentage,
115 Mutex* lock);
116
117 public:
118 virtual SATBMarkQueue& satb_queue_for_thread(JavaThread* const t) const = 0;
119
120 // Apply "set_active(active)" to all SATB queues in the set. It should be
121 // called only with the world stopped. The method will assert that the
122 // SATB queues of all threads it visits, as well as the SATB queue
123 // set itself, has an active value same as expected_active.
124 void set_active_all_threads(bool active, bool expected_active);
125
126 size_t buffer_enqueue_threshold() const { return _buffer_enqueue_threshold; }
127 virtual void filter(SATBMarkQueue* queue) = 0;
128
129 // Filter all the currently-active SATB buffers.
130 void filter_thread_buffers();
131
132 // If there exists some completed buffer, pop and process it, and
133 // return true. Otherwise return false. Processing a buffer
|
93 class SATBMarkQueueSet: public PtrQueueSet {
94 SATBMarkQueue _shared_satb_queue;
95 size_t _buffer_enqueue_threshold;
96
97 #ifdef ASSERT
98 void dump_active_states(bool expected_active);
99 void verify_active_states(bool expected_active);
100 #endif // ASSERT
101
102 protected:
103 SATBMarkQueueSet();
104 ~SATBMarkQueueSet() {}
105
106 template<typename Filter>
107 void apply_filter(Filter filter, SATBMarkQueue* queue) {
108 queue->apply_filter(filter);
109 }
110
111 void initialize(Monitor* cbl_mon,
112 BufferNode::Allocator* allocator,
113 size_t process_completed_buffers_threshold,
114 uint buffer_enqueue_threshold_percentage,
115 Mutex* lock);
116
117 public:
118 virtual SATBMarkQueue& satb_queue_for_thread(JavaThread* const t) const = 0;
119
120 // Apply "set_active(active)" to all SATB queues in the set. It should be
121 // called only with the world stopped. The method will assert that the
122 // SATB queues of all threads it visits, as well as the SATB queue
123 // set itself, has an active value same as expected_active.
124 void set_active_all_threads(bool active, bool expected_active);
125
126 size_t buffer_enqueue_threshold() const { return _buffer_enqueue_threshold; }
127 virtual void filter(SATBMarkQueue* queue) = 0;
128
129 // Filter all the currently-active SATB buffers.
130 void filter_thread_buffers();
131
132 // If there exists some completed buffer, pop and process it, and
133 // return true. Otherwise return false. Processing a buffer
|