RFR: 8287661: Fix and improve BitMap::print_on(outputStream*) [v2]

Aleksey Shipilev shade at openjdk.java.net
Wed Jun 1 15:56:42 UTC 2022


On Wed, 1 Jun 2022 15:47:39 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

>> src/hotspot/share/utilities/bitMap.cpp line 706:
>> 
>>> 704:   }
>>> 705:   st->cr();
>>> 706: }
>> 
>> I wonder if it wouldn't be more useful to use line and chunk sizes that are a power-of-two? Maybe if we find that that would be more useful, than we could later add a second function to support that.
>
> My thought was that the *humans* would try to see where the set bits are, and so working in decimals is better? But we can do binary too, maybe grouping by 8 bits and 8 bytes per line would be quite natural.

Done, see new commit, and new PR body for the example.

-------------

PR: https://git.openjdk.java.net/jdk/pull/8970


More information about the hotspot-dev mailing list