162 } |
162 } |
163 |
163 |
164 ClearNoncleanCardWrapper::ClearNoncleanCardWrapper( |
164 ClearNoncleanCardWrapper::ClearNoncleanCardWrapper( |
165 DirtyCardToOopClosure* dirty_card_closure, CardTableRS* ct) : |
165 DirtyCardToOopClosure* dirty_card_closure, CardTableRS* ct) : |
166 _dirty_card_closure(dirty_card_closure), _ct(ct) { |
166 _dirty_card_closure(dirty_card_closure), _ct(ct) { |
|
167 // Cannot yet substitute active_workers for n_par_threads |
|
168 // in the case where parallelism is being turned off by |
|
169 // setting n_par_threads to 0. |
167 _is_par = (SharedHeap::heap()->n_par_threads() > 0); |
170 _is_par = (SharedHeap::heap()->n_par_threads() > 0); |
|
171 assert(!_is_par || |
|
172 (SharedHeap::heap()->n_par_threads() == |
|
173 SharedHeap::heap()->workers()->active_workers()), "Mismatch"); |
168 } |
174 } |
169 |
175 |
170 void ClearNoncleanCardWrapper::do_MemRegion(MemRegion mr) { |
176 void ClearNoncleanCardWrapper::do_MemRegion(MemRegion mr) { |
171 assert(mr.word_size() > 0, "Error"); |
177 assert(mr.word_size() > 0, "Error"); |
172 assert(_ct->is_aligned(mr.start()), "mr.start() should be card aligned"); |
178 assert(_ct->is_aligned(mr.start()), "mr.start() should be card aligned"); |