< prev index next >

src/hotspot/share/gc/cms/cmsHeap.cpp

Print this page
rev 50281 : 8195097: Make it possible to process StringTable outside safepoint
Reviewed-by:


 203   }
 204 }
 205 
 206 void CMSHeap::stop() {
 207   ConcurrentMarkSweepThread::cmst()->stop();
 208 }
 209 
 210 void CMSHeap::safepoint_synchronize_begin() {
 211   ConcurrentMarkSweepThread::synchronize(false);
 212 }
 213 
 214 void CMSHeap::safepoint_synchronize_end() {
 215   ConcurrentMarkSweepThread::desynchronize(false);
 216 }
 217 
 218 void CMSHeap::cms_process_roots(StrongRootsScope* scope,
 219                                 bool young_gen_as_roots,
 220                                 ScanningOption so,
 221                                 bool only_strong_roots,
 222                                 OopsInGenClosure* root_closure,
 223                                 CLDClosure* cld_closure) {

 224   MarkingCodeBlobClosure mark_code_closure(root_closure, !CodeBlobToOopClosure::FixRelocations);
 225   OopsInGenClosure* weak_roots = only_strong_roots ? NULL : root_closure;
 226   CLDClosure* weak_cld_closure = only_strong_roots ? NULL : cld_closure;
 227 
 228   process_roots(scope, so, root_closure, weak_roots, cld_closure, weak_cld_closure, &mark_code_closure);
 229   if (!only_strong_roots) {
 230     process_string_table_roots(scope, root_closure);
 231   }
 232 
 233   if (young_gen_as_roots &&
 234       !_process_strong_tasks->is_task_claimed(GCH_PS_younger_gens)) {
 235     root_closure->set_generation(young_gen());
 236     young_gen()->oop_iterate(root_closure);
 237     root_closure->reset_generation();
 238   }
 239 
 240   _process_strong_tasks->all_tasks_completed(scope->n_threads());
 241 }
 242 
 243 void CMSHeap::gc_prologue(bool full) {
 244   always_do_update_barrier = false;
 245   GenCollectedHeap::gc_prologue(full);
 246 };
 247 
 248 void CMSHeap::gc_epilogue(bool full) {
 249   GenCollectedHeap::gc_epilogue(full);
 250   always_do_update_barrier = true;


 203   }
 204 }
 205 
 206 void CMSHeap::stop() {
 207   ConcurrentMarkSweepThread::cmst()->stop();
 208 }
 209 
 210 void CMSHeap::safepoint_synchronize_begin() {
 211   ConcurrentMarkSweepThread::synchronize(false);
 212 }
 213 
 214 void CMSHeap::safepoint_synchronize_end() {
 215   ConcurrentMarkSweepThread::desynchronize(false);
 216 }
 217 
 218 void CMSHeap::cms_process_roots(StrongRootsScope* scope,
 219                                 bool young_gen_as_roots,
 220                                 ScanningOption so,
 221                                 bool only_strong_roots,
 222                                 OopsInGenClosure* root_closure,
 223                                 CLDClosure* cld_closure,
 224                                 OopStorage::ParState<false, false>* par_state_string) {
 225   MarkingCodeBlobClosure mark_code_closure(root_closure, !CodeBlobToOopClosure::FixRelocations);
 226   OopsInGenClosure* weak_roots = only_strong_roots ? NULL : root_closure;
 227   CLDClosure* weak_cld_closure = only_strong_roots ? NULL : cld_closure;
 228 
 229   process_roots(scope, so, root_closure, weak_roots, cld_closure, weak_cld_closure, &mark_code_closure);
 230   if (!only_strong_roots) {
 231     process_string_table_roots(scope, root_closure, par_state_string);
 232   }
 233 
 234   if (young_gen_as_roots &&
 235       !_process_strong_tasks->is_task_claimed(GCH_PS_younger_gens)) {
 236     root_closure->set_generation(young_gen());
 237     young_gen()->oop_iterate(root_closure);
 238     root_closure->reset_generation();
 239   }
 240 
 241   _process_strong_tasks->all_tasks_completed(scope->n_threads());
 242 }
 243 
 244 void CMSHeap::gc_prologue(bool full) {
 245   always_do_update_barrier = false;
 246   GenCollectedHeap::gc_prologue(full);
 247 };
 248 
 249 void CMSHeap::gc_epilogue(bool full) {
 250   GenCollectedHeap::gc_epilogue(full);
 251   always_do_update_barrier = true;
< prev index next >