Mercurial > hg > truffle
comparison src/share/vm/gc_implementation/g1/satbQueue.hpp @ 17844:8847586c9037
8016302: Change type of the number of GC workers to unsigned int (2)
Reviewed-by: tschatzl, jwilhelm
author | vkempik |
---|---|
date | Thu, 03 Apr 2014 17:49:31 +0400 |
parents | f99e331f6ef6 |
children | 52b4284cb496 2c6ef90f030a 42c091d63c72 |
comparison
equal
deleted
inserted
replaced
17843:81d7a4b28dc5 | 17844:8847586c9037 |
---|---|
82 ObjPtrQueue _shared_satb_queue; | 82 ObjPtrQueue _shared_satb_queue; |
83 | 83 |
84 // Utility function to support sequential and parallel versions. If | 84 // Utility function to support sequential and parallel versions. If |
85 // "par" is true, then "worker" is the par thread id; if "false", worker | 85 // "par" is true, then "worker" is the par thread id; if "false", worker |
86 // is ignored. | 86 // is ignored. |
87 bool apply_closure_to_completed_buffer_work(bool par, int worker); | 87 bool apply_closure_to_completed_buffer_work(bool par, uint worker); |
88 | 88 |
89 #ifdef ASSERT | 89 #ifdef ASSERT |
90 void dump_active_states(bool expected_active); | 90 void dump_active_states(bool expected_active); |
91 void verify_active_states(bool expected_active); | 91 void verify_active_states(bool expected_active); |
92 #endif // ASSERT | 92 #endif // ASSERT |
122 // Apply the registered closure to all entries on each | 122 // Apply the registered closure to all entries on each |
123 // currently-active buffer and then empty the buffer. It should only | 123 // currently-active buffer and then empty the buffer. It should only |
124 // be called serially and at a safepoint. | 124 // be called serially and at a safepoint. |
125 void iterate_closure_all_threads(); | 125 void iterate_closure_all_threads(); |
126 // Parallel version of the above. | 126 // Parallel version of the above. |
127 void par_iterate_closure_all_threads(int worker); | 127 void par_iterate_closure_all_threads(uint worker); |
128 | 128 |
129 // If there exists some completed buffer, pop it, then apply the | 129 // If there exists some completed buffer, pop it, then apply the |
130 // registered closure to all its elements, and return true. If no | 130 // registered closure to all its elements, and return true. If no |
131 // completed buffers exist, return false. | 131 // completed buffers exist, return false. |
132 bool apply_closure_to_completed_buffer() { | 132 bool apply_closure_to_completed_buffer() { |
133 return apply_closure_to_completed_buffer_work(false, 0); | 133 return apply_closure_to_completed_buffer_work(false, 0); |
134 } | 134 } |
135 // Parallel version of the above. | 135 // Parallel version of the above. |
136 bool par_apply_closure_to_completed_buffer(int worker) { | 136 bool par_apply_closure_to_completed_buffer(uint worker) { |
137 return apply_closure_to_completed_buffer_work(true, worker); | 137 return apply_closure_to_completed_buffer_work(true, worker); |
138 } | 138 } |
139 | 139 |
140 // Apply the given closure on enqueued and currently-active buffers | 140 // Apply the given closure on enqueued and currently-active buffers |
141 // respectively. Both methods are read-only, i.e., they do not | 141 // respectively. Both methods are read-only, i.e., they do not |