Mercurial > hg > graal-jvmci-8
comparison src/share/vm/utilities/bitMap.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 |
---|---|
91 void clear_large_range_of_words (idx_t beg, idx_t end); | 91 void clear_large_range_of_words (idx_t beg, idx_t end); |
92 | 92 |
93 // The index of the first full word in a range. | 93 // The index of the first full word in a range. |
94 idx_t word_index_round_up(idx_t bit) const; | 94 idx_t word_index_round_up(idx_t bit) const; |
95 | 95 |
96 // Verification, statistics. | 96 // Verification. |
97 void verify_index(idx_t index) const; | 97 inline void verify_index(idx_t index) const NOT_DEBUG_RETURN; |
98 void verify_range(idx_t beg_index, idx_t end_index) const; | 98 inline void verify_range(idx_t beg_index, idx_t end_index) const |
99 | 99 NOT_DEBUG_RETURN; |
100 | |
101 // Statistics. | |
100 static idx_t* _pop_count_table; | 102 static idx_t* _pop_count_table; |
101 static void init_pop_count_table(); | 103 static void init_pop_count_table(); |
102 static idx_t num_set_bits(bm_word_t w); | 104 static idx_t num_set_bits(bm_word_t w); |
103 static idx_t num_set_bits_from_table(unsigned char c); | 105 static idx_t num_set_bits_from_table(unsigned char c); |
104 | 106 |
285 // Printing | 287 // Printing |
286 void print_on(outputStream* st) const; | 288 void print_on(outputStream* st) const; |
287 #endif | 289 #endif |
288 }; | 290 }; |
289 | 291 |
290 | |
291 // Convenience class wrapping BitMap which provides multiple bits per slot. | 292 // Convenience class wrapping BitMap which provides multiple bits per slot. |
292 class BitMap2D VALUE_OBJ_CLASS_SPEC { | 293 class BitMap2D VALUE_OBJ_CLASS_SPEC { |
293 public: | 294 public: |
294 typedef BitMap::idx_t idx_t; // Type used for bit and word indices. | 295 typedef BitMap::idx_t idx_t; // Type used for bit and word indices. |
295 typedef BitMap::bm_word_t bm_word_t; // Element type of array that | 296 typedef BitMap::bm_word_t bm_word_t; // Element type of array that |