mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-21 11:34:38 +02:00
8017070: G1: assert(_card_counts[card_num] <= G1ConcRSHotCardLimit) failed
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
This commit is contained in:
parent
36967c98e4
commit
f93ee2a9dd
1 changed files with 2 additions and 5 deletions
|
@ -152,12 +152,9 @@ uint G1CardCounts::add_card_count(jbyte* card_ptr) {
|
||||||
if (card_num < _committed_max_card_num) {
|
if (card_num < _committed_max_card_num) {
|
||||||
count = (uint) _card_counts[card_num];
|
count = (uint) _card_counts[card_num];
|
||||||
if (count < G1ConcRSHotCardLimit) {
|
if (count < G1ConcRSHotCardLimit) {
|
||||||
_card_counts[card_num] += 1;
|
_card_counts[card_num] =
|
||||||
|
(jubyte)(MIN2((uintx)(_card_counts[card_num] + 1), G1ConcRSHotCardLimit));
|
||||||
}
|
}
|
||||||
assert(_card_counts[card_num] <= G1ConcRSHotCardLimit,
|
|
||||||
err_msg("Refinement count overflow? "
|
|
||||||
"new count: "UINT32_FORMAT,
|
|
||||||
(uint) _card_counts[card_num]));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return count;
|
return count;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue