42 } |
42 } |
43 |
43 |
44 void G1CardCounts::clear_range(size_t from_card_num, size_t to_card_num) { |
44 void G1CardCounts::clear_range(size_t from_card_num, size_t to_card_num) { |
45 if (has_count_table()) { |
45 if (has_count_table()) { |
46 assert(from_card_num < to_card_num, |
46 assert(from_card_num < to_card_num, |
47 err_msg("Wrong order? from: " SIZE_FORMAT ", to: "SIZE_FORMAT, |
47 err_msg("Wrong order? from: " SIZE_FORMAT ", to: " SIZE_FORMAT, |
48 from_card_num, to_card_num)); |
48 from_card_num, to_card_num)); |
49 Copy::fill_to_bytes(&_card_counts[from_card_num], (to_card_num - from_card_num)); |
49 Copy::fill_to_bytes(&_card_counts[from_card_num], (to_card_num - from_card_num)); |
50 } |
50 } |
51 } |
51 } |
52 |
52 |
85 // cold and will be refined immediately. |
85 // cold and will be refined immediately. |
86 uint count = 0; |
86 uint count = 0; |
87 if (has_count_table()) { |
87 if (has_count_table()) { |
88 size_t card_num = ptr_2_card_num(card_ptr); |
88 size_t card_num = ptr_2_card_num(card_ptr); |
89 assert(card_num < _reserved_max_card_num, |
89 assert(card_num < _reserved_max_card_num, |
90 err_msg("Card "SIZE_FORMAT" outside of card counts table (max size "SIZE_FORMAT")", |
90 err_msg("Card " SIZE_FORMAT " outside of card counts table (max size " SIZE_FORMAT ")", |
91 card_num, _reserved_max_card_num)); |
91 card_num, _reserved_max_card_num)); |
92 count = (uint) _card_counts[card_num]; |
92 count = (uint) _card_counts[card_num]; |
93 if (count < G1ConcRSHotCardLimit) { |
93 if (count < G1ConcRSHotCardLimit) { |
94 _card_counts[card_num] = |
94 _card_counts[card_num] = |
95 (jubyte)(MIN2((uintx)(_card_counts[card_num] + 1), G1ConcRSHotCardLimit)); |
95 (jubyte)(MIN2((uintx)(_card_counts[card_num] + 1), G1ConcRSHotCardLimit)); |