comparison src/share/vm/gc_implementation/g1/g1CardCounts.cpp @ 11069:5ea20b3bd249

8017070: G1: assert(_card_counts[card_num] <= G1ConcRSHotCardLimit) failed Summary: The assert is invalid when a card is being refined by two different threads and its count crosses the hot threshold - the refinement count will be updated once by each thread triggering the assert. Remove the assert and update the count using a bounded expression. Reviewed-by: jmasa, tamao, brutisso
author johnc
date Mon, 01 Jul 2013 09:30:23 -0700
parents bed55d125e37
children 9cb63cd234a0
comparison
equal deleted inserted replaced
11068:b30744960351 11069:5ea20b3bd249
150 if (has_count_table()) { 150 if (has_count_table()) {
151 size_t card_num = ptr_2_card_num(card_ptr); 151 size_t card_num = ptr_2_card_num(card_ptr);
152 if (card_num < _committed_max_card_num) { 152 if (card_num < _committed_max_card_num) {
153 count = (uint) _card_counts[card_num]; 153 count = (uint) _card_counts[card_num];
154 if (count < G1ConcRSHotCardLimit) { 154 if (count < G1ConcRSHotCardLimit) {
155 _card_counts[card_num] += 1; 155 _card_counts[card_num] =
156 (jubyte)(MIN2((uintx)(_card_counts[card_num] + 1), G1ConcRSHotCardLimit));
156 } 157 }
157 assert(_card_counts[card_num] <= G1ConcRSHotCardLimit,
158 err_msg("Refinement count overflow? "
159 "new count: "UINT32_FORMAT,
160 (uint) _card_counts[card_num]));
161 } 158 }
162 } 159 }
163 return count; 160 return count;
164 } 161 }
165 162