31 class JavaThread; |
31 class JavaThread; |
32 class SATBMarkQueueSet; |
32 class SATBMarkQueueSet; |
33 |
33 |
34 // A ptrQueue whose elements are "oops", pointers to object heads. |
34 // A ptrQueue whose elements are "oops", pointers to object heads. |
35 class ObjPtrQueue: public PtrQueue { |
35 class ObjPtrQueue: public PtrQueue { |
|
36 friend class Threads; |
36 friend class SATBMarkQueueSet; |
37 friend class SATBMarkQueueSet; |
|
38 friend class G1RemarkThreadsClosure; |
37 |
39 |
38 private: |
40 private: |
39 // Filter out unwanted entries from the buffer. |
41 // Filter out unwanted entries from the buffer. |
40 void filter(); |
42 void filter(); |
41 |
43 |
117 void set_closure(ObjectClosure* closure); |
119 void set_closure(ObjectClosure* closure); |
118 // Set the parallel closures: pointer is an array of pointers to |
120 // Set the parallel closures: pointer is an array of pointers to |
119 // closures, one for each parallel GC thread. |
121 // closures, one for each parallel GC thread. |
120 void set_par_closure(int i, ObjectClosure* closure); |
122 void set_par_closure(int i, ObjectClosure* closure); |
121 |
123 |
122 // Apply the registered closure to all entries on each |
|
123 // currently-active buffer and then empty the buffer. It should only |
|
124 // be called serially and at a safepoint. |
|
125 void iterate_closure_all_threads(); |
|
126 // Parallel version of the above. |
|
127 void par_iterate_closure_all_threads(uint worker); |
|
128 |
|
129 // If there exists some completed buffer, pop it, then apply the |
124 // If there exists some completed buffer, pop it, then apply the |
130 // registered closure to all its elements, and return true. If no |
125 // registered closure to all its elements, and return true. If no |
131 // completed buffers exist, return false. |
126 // completed buffers exist, return false. |
132 bool apply_closure_to_completed_buffer() { |
127 bool apply_closure_to_completed_buffer() { |
133 return apply_closure_to_completed_buffer_work(false, 0); |
128 return apply_closure_to_completed_buffer_work(false, 0); |