Mercurial > hg > graal-jvmci-8
comparison src/share/vm/utilities/bitMap.inline.hpp @ 809:6e2afda171db
6849716: BitMap - performance regression introduced with G1
Summary: make verification code visible only in debug builds
Reviewed-by: iveresov, ysr, johnc, apetrusenko, tonyp
author | jcoomes |
---|---|
date | Thu, 11 Jun 2009 13:31:01 -0700 |
parents | 37f87013dfd8 |
children | bd02caa94611 |
comparison
equal
deleted
inserted
replaced
808:353ba4575581 | 809:6e2afda171db |
---|---|
20 * CA 95054 USA or visit www.sun.com if you need additional information or | 20 * CA 95054 USA or visit www.sun.com if you need additional information or |
21 * have any questions. | 21 * have any questions. |
22 * | 22 * |
23 */ | 23 */ |
24 | 24 |
25 #ifdef ASSERT | |
26 inline void BitMap::verify_index(idx_t index) const { | |
27 assert(index < _size, "BitMap index out of bounds"); | |
28 } | |
29 | |
30 inline void BitMap::verify_range(idx_t beg_index, idx_t end_index) const { | |
31 assert(beg_index <= end_index, "BitMap range error"); | |
32 // Note that [0,0) and [size,size) are both valid ranges. | |
33 if (end_index != _size) verify_index(end_index); | |
34 } | |
35 #endif // #ifdef ASSERT | |
25 | 36 |
26 inline void BitMap::set_bit(idx_t bit) { | 37 inline void BitMap::set_bit(idx_t bit) { |
27 verify_index(bit); | 38 verify_index(bit); |
28 *word_addr(bit) |= bit_mask(bit); | 39 *word_addr(bit) |= bit_mask(bit); |
29 } | 40 } |