src/share/vm/gc_implementation/g1/g1CollectorPolicy.cpp

changeset 2963
c3f1170908be
parent 2962
ae5b2f1dcf12
child 2975
5f6f2615433a
equal deleted inserted replaced
2962:ae5b2f1dcf12 2963:c3f1170908be
2637 add_to_collection_set(HeapRegion* hr) { 2637 add_to_collection_set(HeapRegion* hr) {
2638 assert(_inc_cset_build_state == Active, "Precondition"); 2638 assert(_inc_cset_build_state == Active, "Precondition");
2639 assert(!hr->is_young(), "non-incremental add of young region"); 2639 assert(!hr->is_young(), "non-incremental add of young region");
2640 2640
2641 if (G1PrintHeapRegions) { 2641 if (G1PrintHeapRegions) {
2642 gclog_or_tty->print_cr("added region to cset " 2642 gclog_or_tty->print_cr("added region to cset "HR_FORMAT,
2643 "%d:["PTR_FORMAT", "PTR_FORMAT"], " 2643 HR_FORMAT_PARAMS(hr));
2644 "top "PTR_FORMAT", %s",
2645 hr->hrs_index(), hr->bottom(), hr->end(),
2646 hr->top(), hr->is_young() ? "YOUNG" : "NOT_YOUNG");
2647 } 2644 }
2648 2645
2649 if (_g1->mark_in_progress()) 2646 if (_g1->mark_in_progress())
2650 _g1->concurrent_mark()->registerCSetRegion(hr); 2647 _g1->concurrent_mark()->registerCSetRegion(hr);
2651 2648
2811 _inc_cset_tail->set_next_in_collection_set(hr); 2808 _inc_cset_tail->set_next_in_collection_set(hr);
2812 } 2809 }
2813 _inc_cset_tail = hr; 2810 _inc_cset_tail = hr;
2814 2811
2815 if (G1PrintHeapRegions) { 2812 if (G1PrintHeapRegions) {
2816 gclog_or_tty->print_cr(" added region to incremental cset (RHS) " 2813 gclog_or_tty->print_cr(" added region to incremental cset (RHS) "HR_FORMAT,
2817 "%d:["PTR_FORMAT", "PTR_FORMAT"], " 2814 HR_FORMAT_PARAMS(hr));
2818 "top "PTR_FORMAT", young %s",
2819 hr->hrs_index(), hr->bottom(), hr->end(),
2820 hr->top(), (hr->is_young()) ? "YES" : "NO");
2821 } 2815 }
2822 } 2816 }
2823 2817
2824 // Add the region to the LHS of the incremental cset 2818 // Add the region to the LHS of the incremental cset
2825 void G1CollectorPolicy::add_region_to_incremental_cset_lhs(HeapRegion* hr) { 2819 void G1CollectorPolicy::add_region_to_incremental_cset_lhs(HeapRegion* hr) {
2836 _inc_cset_tail = hr; 2830 _inc_cset_tail = hr;
2837 } 2831 }
2838 _inc_cset_head = hr; 2832 _inc_cset_head = hr;
2839 2833
2840 if (G1PrintHeapRegions) { 2834 if (G1PrintHeapRegions) {
2841 gclog_or_tty->print_cr(" added region to incremental cset (LHS) " 2835 gclog_or_tty->print_cr(" added region to incremental cset (LHS) "HR_FORMAT,
2842 "%d:["PTR_FORMAT", "PTR_FORMAT"], " 2836 HR_FORMAT_PARAMS(hr));
2843 "top "PTR_FORMAT", young %s",
2844 hr->hrs_index(), hr->bottom(), hr->end(),
2845 hr->top(), (hr->is_young()) ? "YES" : "NO");
2846 } 2837 }
2847 } 2838 }
2848 2839
2849 #ifndef PRODUCT 2840 #ifndef PRODUCT
2850 void G1CollectorPolicy::print_collection_set(HeapRegion* list_head, outputStream* st) { 2841 void G1CollectorPolicy::print_collection_set(HeapRegion* list_head, outputStream* st) {

mercurial