RFR(xs): 8241581: Add BitMap::count_one_bits variant for arbitrary lengths
Thomas Stüfe
thomas.stuefe at gmail.com
Wed Mar 25 12:35:41 UTC 2020
Greetings,
could I have reviews for this small enhancement please:
JBS: https://bugs.openjdk.java.net/browse/JDK-8241581
Webrev:
http://cr.openjdk.java.net/~stuefe/webrevs/bitmap-arbitrary-range-popcount/webrev.00/webrev/
This adds the ability to call BitMap::count_one_bits on an arbitrary bit
region, not just on the whole BitMap. I need this for the new Metaspace
prototype.
Note that while it would be cool to use platform dependent popcnt
instructions here, that is not the goal of this fix. This just expands on
the existing implementation of BitMap::count_one_bits() using the algorithm
in population:count.hpp.
It comes with quite thorough gtests. I ran the gtests on little and big
endian machines and all is well. Submit tests also ran through.
Thanks, Thomas
More information about the hotspot-runtime-dev
mailing list