8179181: Cleanup BitMap search API
authorkbarrett
Sun, 23 Apr 2017 15:02:46 -0400
changeset 46402 8147e17ad6fa
parent 46401 88f27ae830d6
child 46403 f2b91b928476
8179181: Cleanup BitMap search API Summary: Remove _inline suffixes and remove duplicate wrappers. Reviewed-by: dholmes, coleenp
hotspot/src/share/vm/gc/parallel/parMarkBitMap.hpp
hotspot/src/share/vm/utilities/bitMap.hpp
hotspot/src/share/vm/utilities/bitMap.inline.hpp
--- a/hotspot/src/share/vm/gc/parallel/parMarkBitMap.hpp	Sat Apr 22 00:56:56 2017 +0000
+++ b/hotspot/src/share/vm/gc/parallel/parMarkBitMap.hpp	Sun Apr 23 15:02:46 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -305,7 +305,7 @@
 
 inline size_t ParMarkBitMap::obj_size(idx_t beg_bit) const
 {
-  const idx_t end_bit = _end_bits.get_next_one_offset_inline(beg_bit, size());
+  const idx_t end_bit = _end_bits.get_next_one_offset(beg_bit, size());
   assert(is_marked(beg_bit), "obj not marked");
   assert(end_bit < size(), "end bit missing");
   return obj_size(beg_bit, end_bit);
@@ -359,13 +359,13 @@
 inline ParMarkBitMap::idx_t
 ParMarkBitMap::find_obj_beg(idx_t beg, idx_t end) const
 {
-  return _beg_bits.get_next_one_offset_inline_aligned_right(beg, end);
+  return _beg_bits.get_next_one_offset_aligned_right(beg, end);
 }
 
 inline ParMarkBitMap::idx_t
 ParMarkBitMap::find_obj_end(idx_t beg, idx_t end) const
 {
-  return _end_bits.get_next_one_offset_inline_aligned_right(beg, end);
+  return _end_bits.get_next_one_offset_aligned_right(beg, end);
 }
 
 inline HeapWord*
--- a/hotspot/src/share/vm/utilities/bitMap.hpp	Sat Apr 22 00:56:56 2017 +0000
+++ b/hotspot/src/share/vm/utilities/bitMap.hpp	Sun Apr 23 15:02:46 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -247,15 +247,6 @@
   // Looking for 1's and 0's at indices equal to or greater than "l_index",
   // stopping if none has been found before "r_index", and returning
   // "r_index" (which must be at most "size") in that case.
-  idx_t get_next_one_offset_inline (idx_t l_index, idx_t r_index) const;
-  idx_t get_next_zero_offset_inline(idx_t l_index, idx_t r_index) const;
-
-  // Like "get_next_one_offset_inline", except requires that "r_index" is
-  // aligned to bitsizeof(bm_word_t).
-  idx_t get_next_one_offset_inline_aligned_right(idx_t l_index,
-                                                        idx_t r_index) const;
-
-  // Non-inline versionsof the above.
   idx_t get_next_one_offset (idx_t l_index, idx_t r_index) const;
   idx_t get_next_zero_offset(idx_t l_index, idx_t r_index) const;
 
@@ -266,6 +257,10 @@
     return get_next_zero_offset(offset, size());
   }
 
+  // Like "get_next_one_offset", except requires that "r_index" is
+  // aligned to bitsizeof(bm_word_t).
+  idx_t get_next_one_offset_aligned_right(idx_t l_index, idx_t r_index) const;
+
   // Returns the number of bits set in the bitmap.
   idx_t count_one_bits() const;
 
--- a/hotspot/src/share/vm/utilities/bitMap.inline.hpp	Sat Apr 22 00:56:56 2017 +0000
+++ b/hotspot/src/share/vm/utilities/bitMap.inline.hpp	Sun Apr 23 15:02:46 2017 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -146,7 +146,7 @@
 }
 
 inline BitMap::idx_t
-BitMap::get_next_one_offset_inline(idx_t l_offset, idx_t r_offset) const {
+BitMap::get_next_one_offset(idx_t l_offset, idx_t r_offset) const {
   assert(l_offset <= size(), "BitMap index out of bounds");
   assert(r_offset <= size(), "BitMap index out of bounds");
   assert(l_offset <= r_offset, "l_offset > r_offset ?");
@@ -209,7 +209,7 @@
 }
 
 inline BitMap::idx_t
-BitMap::get_next_zero_offset_inline(idx_t l_offset, idx_t r_offset) const {
+BitMap::get_next_zero_offset(idx_t l_offset, idx_t r_offset) const {
   assert(l_offset <= size(), "BitMap index out of bounds");
   assert(r_offset <= size(), "BitMap index out of bounds");
   assert(l_offset <= r_offset, "l_offset > r_offset ?");
@@ -251,8 +251,7 @@
 }
 
 inline BitMap::idx_t
-BitMap::get_next_one_offset_inline_aligned_right(idx_t l_offset,
-                                                 idx_t r_offset) const
+BitMap::get_next_one_offset_aligned_right(idx_t l_offset, idx_t r_offset) const
 {
   verify_range(l_offset, r_offset);
   assert(bit_in_word(r_offset) == 0, "r_offset not word-aligned");
@@ -322,16 +321,6 @@
   return bit_rounded_up > bit ? word_index(bit_rounded_up) : size_in_words();
 }
 
-inline BitMap::idx_t BitMap::get_next_one_offset(idx_t l_offset,
-                                          idx_t r_offset) const {
-  return get_next_one_offset_inline(l_offset, r_offset);
-}
-
-inline BitMap::idx_t BitMap::get_next_zero_offset(idx_t l_offset,
-                                           idx_t r_offset) const {
-  return get_next_zero_offset_inline(l_offset, r_offset);
-}
-
 inline bool BitMap2D::is_valid_index(idx_t slot_index, idx_t bit_within_slot_index) {
   verify_bit_within_slot_index(bit_within_slot_index);
   return (bit_index(slot_index, bit_within_slot_index) < size_in_bits());