< prev index next >

src/share/vm/gc/shared/genCollectedHeap.cpp

Print this page




 705                                           bool only_strong_roots,
 706                                           OopsInGenClosure* root_closure,
 707                                           CLDClosure* cld_closure) {
 708   MarkingCodeBlobClosure mark_code_closure(root_closure, is_adjust_phase);
 709   OopsInGenClosure* weak_roots = only_strong_roots ? NULL : root_closure;
 710   CLDClosure* weak_cld_closure = only_strong_roots ? NULL : cld_closure;
 711 
 712   process_roots(scope, so, root_closure, weak_roots, cld_closure, weak_cld_closure, &mark_code_closure);
 713   if (is_adjust_phase) {
 714     // We never treat the string table as roots during marking
 715     // for the full gc, so we only need to process it during
 716     // the adjust phase.
 717     process_string_table_roots(scope, root_closure);
 718   }
 719 
 720   _process_strong_tasks->all_tasks_completed(scope->n_threads());
 721 }
 722 
 723 void GenCollectedHeap::gen_process_weak_roots(OopClosure* root_closure) {
 724   JNIHandles::weak_oops_do(root_closure);

 725   _young_gen->ref_processor()->weak_oops_do(root_closure);
 726   _old_gen->ref_processor()->weak_oops_do(root_closure);
 727 }
 728 
 729 #define GCH_SINCE_SAVE_MARKS_ITERATE_DEFN(OopClosureType, nv_suffix)    \
 730 void GenCollectedHeap::                                                 \
 731 oop_since_save_marks_iterate(GenerationType gen,                        \
 732                              OopClosureType* cur,                       \
 733                              OopClosureType* older) {                   \
 734   if (gen == YoungGen) {                              \
 735     _young_gen->oop_since_save_marks_iterate##nv_suffix(cur);           \
 736     _old_gen->oop_since_save_marks_iterate##nv_suffix(older);           \
 737   } else {                                                              \
 738     _old_gen->oop_since_save_marks_iterate##nv_suffix(cur);             \
 739   }                                                                     \
 740 }
 741 
 742 ALL_SINCE_SAVE_MARKS_CLOSURES(GCH_SINCE_SAVE_MARKS_ITERATE_DEFN)
 743 
 744 #undef GCH_SINCE_SAVE_MARKS_ITERATE_DEFN




 705                                           bool only_strong_roots,
 706                                           OopsInGenClosure* root_closure,
 707                                           CLDClosure* cld_closure) {
 708   MarkingCodeBlobClosure mark_code_closure(root_closure, is_adjust_phase);
 709   OopsInGenClosure* weak_roots = only_strong_roots ? NULL : root_closure;
 710   CLDClosure* weak_cld_closure = only_strong_roots ? NULL : cld_closure;
 711 
 712   process_roots(scope, so, root_closure, weak_roots, cld_closure, weak_cld_closure, &mark_code_closure);
 713   if (is_adjust_phase) {
 714     // We never treat the string table as roots during marking
 715     // for the full gc, so we only need to process it during
 716     // the adjust phase.
 717     process_string_table_roots(scope, root_closure);
 718   }
 719 
 720   _process_strong_tasks->all_tasks_completed(scope->n_threads());
 721 }
 722 
 723 void GenCollectedHeap::gen_process_weak_roots(OopClosure* root_closure) {
 724   JNIHandles::weak_oops_do(root_closure);
 725   HeapMonitoring::do_weak_oops(root_closure);
 726   _young_gen->ref_processor()->weak_oops_do(root_closure);
 727   _old_gen->ref_processor()->weak_oops_do(root_closure);
 728 }
 729 
 730 #define GCH_SINCE_SAVE_MARKS_ITERATE_DEFN(OopClosureType, nv_suffix)    \
 731 void GenCollectedHeap::                                                 \
 732 oop_since_save_marks_iterate(GenerationType gen,                        \
 733                              OopClosureType* cur,                       \
 734                              OopClosureType* older) {                   \
 735   if (gen == YoungGen) {                              \
 736     _young_gen->oop_since_save_marks_iterate##nv_suffix(cur);           \
 737     _old_gen->oop_since_save_marks_iterate##nv_suffix(older);           \
 738   } else {                                                              \
 739     _old_gen->oop_since_save_marks_iterate##nv_suffix(cur);             \
 740   }                                                                     \
 741 }
 742 
 743 ALL_SINCE_SAVE_MARKS_CLOSURES(GCH_SINCE_SAVE_MARKS_ITERATE_DEFN)
 744 
 745 #undef GCH_SINCE_SAVE_MARKS_ITERATE_DEFN


< prev index next >