RFR(xs): 8241581: Add BitMap::count_one_bits variant for arbitrary lengths
Kim Barrett
kim.barrett at oracle.com
Thu Mar 26 19:42:31 UTC 2020
> On Mar 25, 2020, at 8:35 AM, Thomas Stüfe <thomas.stuefe at gmail.com> wrote:
>
> 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
Looks good.
More information about the hotspot-runtime-dev
mailing list