equal
deleted
inserted
replaced
51 } |
51 } |
52 |
52 |
53 void G1CardCounts::clear_range(size_t from_card_num, size_t to_card_num) { |
53 void G1CardCounts::clear_range(size_t from_card_num, size_t to_card_num) { |
54 if (has_count_table()) { |
54 if (has_count_table()) { |
55 assert(from_card_num < to_card_num, |
55 assert(from_card_num < to_card_num, |
56 err_msg("Wrong order? from: " SIZE_FORMAT ", to: " SIZE_FORMAT, |
56 "Wrong order? from: " SIZE_FORMAT ", to: " SIZE_FORMAT, |
57 from_card_num, to_card_num)); |
57 from_card_num, to_card_num); |
58 Copy::fill_to_bytes(&_card_counts[from_card_num], (to_card_num - from_card_num)); |
58 Copy::fill_to_bytes(&_card_counts[from_card_num], (to_card_num - from_card_num)); |
59 } |
59 } |
60 } |
60 } |
61 |
61 |
62 G1CardCounts::G1CardCounts(G1CollectedHeap *g1h): |
62 G1CardCounts::G1CardCounts(G1CollectedHeap *g1h): |
94 // cold and will be refined immediately. |
94 // cold and will be refined immediately. |
95 uint count = 0; |
95 uint count = 0; |
96 if (has_count_table()) { |
96 if (has_count_table()) { |
97 size_t card_num = ptr_2_card_num(card_ptr); |
97 size_t card_num = ptr_2_card_num(card_ptr); |
98 assert(card_num < _reserved_max_card_num, |
98 assert(card_num < _reserved_max_card_num, |
99 err_msg("Card " SIZE_FORMAT " outside of card counts table (max size " SIZE_FORMAT ")", |
99 "Card " SIZE_FORMAT " outside of card counts table (max size " SIZE_FORMAT ")", |
100 card_num, _reserved_max_card_num)); |
100 card_num, _reserved_max_card_num); |
101 count = (uint) _card_counts[card_num]; |
101 count = (uint) _card_counts[card_num]; |
102 if (count < G1ConcRSHotCardLimit) { |
102 if (count < G1ConcRSHotCardLimit) { |
103 _card_counts[card_num] = |
103 _card_counts[card_num] = |
104 (jubyte)(MIN2((uintx)(_card_counts[card_num] + 1), G1ConcRSHotCardLimit)); |
104 (jubyte)(MIN2((uintx)(_card_counts[card_num] + 1), G1ConcRSHotCardLimit)); |
105 } |
105 } |