JDK-8179181 : Cleanup BitMap search API
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: runtime
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2017-04-22
  • Updated: 2017-08-25
  • Resolved: 2017-04-23
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 10
10 b21Fixed
Related Reports
Relates :  
Relates :  
Description
BitMap presently has

get_next_one_offset(idx_t)
get_next_one_offset(idx_t, idx_t)
get_next_one_offset_inline(idx_t, idx_t)
get_next_one_offset_inline_aligned_right(idx_t, idx_t)

get_next_zero_offset(idx_t)
get_next_zero_offset(idx_t, idx_t)
get_next_zero_offset_inline(idx_t, idx_t)
// no inline_aligned_right because no callers

The one-argument get_next_{zero,one}_offset functions are simple inline wrappers for calling the corresponding two-argument function with the bitmap's size() as the second argument.  No issues there.

The two-argument get_next_{zero,one}_offset functions are commented in BitMap.hpp as being not-inline, but are declared inline in BitMap.inline.hpp. And many (most?) callers are performance sensitive.  There are probably no callers that truly need a non-inline call; there are probably some that don't care.

The only direct outside callers of the _inline suffixed are a few functions in ParallelGC.  So all other BitMap searchers are using the unsuffixed variants, even where performance critical.

The API would be made less confusing by dropping the _inline suffixes and removing the pre-existing non-suffixed two-argument variants.

Comments
URL: http://hg.openjdk.java.net/jdk10/jdk10/hotspot/rev/7842fd7eaf41 User: jwilhelm Date: 2017-08-18 18:01:35 +0000
18-08-2017

URL: http://hg.openjdk.java.net/jdk10/hs/hotspot/rev/7842fd7eaf41 User: kbarrett Date: 2017-04-23 20:01:33 +0000
23-04-2017

It seems the present API was introduced by the initial G1 integration, including the confusion over whether get_next_{zero,one}_offset with two-arguments were inlined or not.
22-04-2017