8017070: G1: assert(_card_counts[card_num] <= G1ConcRSHotCardLimit) failed

Mon, 01 Jul 2013 09:30:23 -0700

author
johnc
date
Mon, 01 Jul 2013 09:30:23 -0700
changeset 5342
5ea20b3bd249
parent 5341
b30744960351
child 5343
6e3634222155

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

src/share/vm/gc_implementation/g1/g1CardCounts.cpp file | annotate | diff | comparison | revisions
     1.1 --- a/src/share/vm/gc_implementation/g1/g1CardCounts.cpp	Sun Jun 30 21:42:07 2013 +0200
     1.2 +++ b/src/share/vm/gc_implementation/g1/g1CardCounts.cpp	Mon Jul 01 09:30:23 2013 -0700
     1.3 @@ -152,12 +152,9 @@
     1.4      if (card_num < _committed_max_card_num) {
     1.5        count = (uint) _card_counts[card_num];
     1.6        if (count < G1ConcRSHotCardLimit) {
     1.7 -        _card_counts[card_num] += 1;
     1.8 +        _card_counts[card_num] =
     1.9 +          (jubyte)(MIN2((uintx)(_card_counts[card_num] + 1), G1ConcRSHotCardLimit));
    1.10        }
    1.11 -      assert(_card_counts[card_num] <= G1ConcRSHotCardLimit,
    1.12 -             err_msg("Refinement count overflow? "
    1.13 -                     "new count: "UINT32_FORMAT,
    1.14 -                     (uint) _card_counts[card_num]));
    1.15      }
    1.16    }
    1.17    return count;

mercurial