< prev index next >

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

Print this page
rev 50505 : imported patch 8204613-stringtable-unclean-fix


 574     par_scan_state()->start_term_time();
 575     if (terminator()->offer_termination()) break;
 576     par_scan_state()->end_term_time();
 577   }
 578   assert(par_gen()->_overflow_list == NULL && par_gen()->_num_par_pushes == 0,
 579          "Broken overflow list?");
 580   // Finish the last termination pause.
 581   par_scan_state()->end_term_time();
 582 }
 583 
 584 ParNewGenTask::ParNewGenTask(ParNewGeneration* young_gen,
 585                              Generation* old_gen,
 586                              HeapWord* young_old_boundary,
 587                              ParScanThreadStateSet* state_set,
 588                              StrongRootsScope* strong_roots_scope) :
 589     AbstractGangTask("ParNewGeneration collection"),
 590     _young_gen(young_gen), _old_gen(old_gen),
 591     _young_old_boundary(young_old_boundary),
 592     _state_set(state_set),
 593     _strong_roots_scope(strong_roots_scope),
 594     _par_state_string(StringTable::weak_storage())
 595 {}





 596 
 597 void ParNewGenTask::work(uint worker_id) {
 598   CMSHeap* heap = CMSHeap::heap();
 599   // Since this is being done in a separate thread, need new resource
 600   // and handle marks.
 601   ResourceMark rm;
 602   HandleMark hm;
 603 
 604   ParScanThreadState& par_scan_state = _state_set->thread_state(worker_id);
 605   assert(_state_set->is_valid(worker_id), "Should not have been called");
 606 
 607   par_scan_state.set_young_old_boundary(_young_old_boundary);
 608 
 609   CLDScanClosure cld_scan_closure(&par_scan_state.to_space_root_closure(),
 610                                   heap->rem_set()->cld_rem_set()->accumulate_modified_oops());
 611 
 612   par_scan_state.start_strong_roots();
 613   heap->young_process_roots(_strong_roots_scope,
 614                            &par_scan_state.to_space_root_closure(),
 615                            &par_scan_state.older_gen_closure(),




 574     par_scan_state()->start_term_time();
 575     if (terminator()->offer_termination()) break;
 576     par_scan_state()->end_term_time();
 577   }
 578   assert(par_gen()->_overflow_list == NULL && par_gen()->_num_par_pushes == 0,
 579          "Broken overflow list?");
 580   // Finish the last termination pause.
 581   par_scan_state()->end_term_time();
 582 }
 583 
 584 ParNewGenTask::ParNewGenTask(ParNewGeneration* young_gen,
 585                              Generation* old_gen,
 586                              HeapWord* young_old_boundary,
 587                              ParScanThreadStateSet* state_set,
 588                              StrongRootsScope* strong_roots_scope) :
 589     AbstractGangTask("ParNewGeneration collection"),
 590     _young_gen(young_gen), _old_gen(old_gen),
 591     _young_old_boundary(young_old_boundary),
 592     _state_set(state_set),
 593     _strong_roots_scope(strong_roots_scope),
 594     _par_state_string(StringTable::weak_storage()) {
 595   StringTable::reset_dead_counter();
 596 }
 597 
 598 ParNewGenTask::~ParNewGenTask() {
 599   StringTable::finish_dead_counter();
 600 }
 601 
 602 void ParNewGenTask::work(uint worker_id) {
 603   CMSHeap* heap = CMSHeap::heap();
 604   // Since this is being done in a separate thread, need new resource
 605   // and handle marks.
 606   ResourceMark rm;
 607   HandleMark hm;
 608 
 609   ParScanThreadState& par_scan_state = _state_set->thread_state(worker_id);
 610   assert(_state_set->is_valid(worker_id), "Should not have been called");
 611 
 612   par_scan_state.set_young_old_boundary(_young_old_boundary);
 613 
 614   CLDScanClosure cld_scan_closure(&par_scan_state.to_space_root_closure(),
 615                                   heap->rem_set()->cld_rem_set()->accumulate_modified_oops());
 616 
 617   par_scan_state.start_strong_roots();
 618   heap->young_process_roots(_strong_roots_scope,
 619                            &par_scan_state.to_space_root_closure(),
 620                            &par_scan_state.older_gen_closure(),


< prev index next >