8024671: G1 generates assert error messages in product builds

Fri, 13 Sep 2013 07:57:13 +0200

author
shade
date
Fri, 13 Sep 2013 07:57:13 +0200
changeset 5709
9cb63cd234a0
parent 5708
8c5e6482cbfc
child 5710
884ed7a10f09
child 5711
23ae5a04724d

8024671: G1 generates assert error messages in product builds
Reviewed-by: brutisso, tschatzl

src/share/vm/gc_implementation/g1/g1CardCounts.cpp file | annotate | diff | comparison | revisions
src/share/vm/gc_implementation/g1/g1CardCounts.hpp file | annotate | diff | comparison | revisions
     1.1 --- a/src/share/vm/gc_implementation/g1/g1CardCounts.cpp	Fri Sep 13 22:25:27 2013 +0200
     1.2 +++ b/src/share/vm/gc_implementation/g1/g1CardCounts.cpp	Fri Sep 13 07:57:13 2013 +0200
     1.3 @@ -33,8 +33,8 @@
     1.4  
     1.5  void G1CardCounts::clear_range(size_t from_card_num, size_t to_card_num) {
     1.6    if (has_count_table()) {
     1.7 -    check_card_num(from_card_num,
     1.8 -                   err_msg("from card num out of range: "SIZE_FORMAT, from_card_num));
     1.9 +    assert(from_card_num >= 0 && from_card_num < _committed_max_card_num,
    1.10 +           err_msg("from card num out of range: "SIZE_FORMAT, from_card_num));
    1.11      assert(from_card_num < to_card_num,
    1.12             err_msg("Wrong order? from: " SIZE_FORMAT ", to: "SIZE_FORMAT,
    1.13                     from_card_num, to_card_num));
     2.1 --- a/src/share/vm/gc_implementation/g1/g1CardCounts.hpp	Fri Sep 13 22:25:27 2013 +0200
     2.2 +++ b/src/share/vm/gc_implementation/g1/g1CardCounts.hpp	Fri Sep 13 07:57:13 2013 +0200
     2.3 @@ -72,25 +72,21 @@
     2.4      return has_reserved_count_table() && _committed_max_card_num > 0;
     2.5    }
     2.6  
     2.7 -  void check_card_num(size_t card_num, const char* msg) {
     2.8 -    assert(card_num >= 0 && card_num < _committed_max_card_num, msg);
     2.9 -  }
    2.10 -
    2.11    size_t ptr_2_card_num(const jbyte* card_ptr) {
    2.12      assert(card_ptr >= _ct_bot,
    2.13 -           err_msg("Inavalied card pointer: "
    2.14 +           err_msg("Invalid card pointer: "
    2.15                     "card_ptr: " PTR_FORMAT ", "
    2.16                     "_ct_bot: " PTR_FORMAT,
    2.17                     card_ptr, _ct_bot));
    2.18      size_t card_num = pointer_delta(card_ptr, _ct_bot, sizeof(jbyte));
    2.19 -    check_card_num(card_num,
    2.20 -                   err_msg("card pointer out of range: " PTR_FORMAT, card_ptr));
    2.21 +    assert(card_num >= 0 && card_num < _committed_max_card_num,
    2.22 +           err_msg("card pointer out of range: " PTR_FORMAT, card_ptr));
    2.23      return card_num;
    2.24    }
    2.25  
    2.26    jbyte* card_num_2_ptr(size_t card_num) {
    2.27 -    check_card_num(card_num,
    2.28 -                   err_msg("card num out of range: "SIZE_FORMAT, card_num));
    2.29 +    assert(card_num >= 0 && card_num < _committed_max_card_num,
    2.30 +           err_msg("card num out of range: "SIZE_FORMAT, card_num));
    2.31      return (jbyte*) (_ct_bot + card_num);
    2.32    }
    2.33  

mercurial