RFR: 8287661: Fix and improve BitMap::print_on(outputStream*) [v2]
Aleksey Shipilev
shade at openjdk.java.net
Thu Jun 2 18:18:43 UTC 2022
On Wed, 1 Jun 2022 15:56:39 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:
>> Found these inconvenient during debugging using the `BitMap::print_on`. We pass the `outputStream*` to the method, but do not use it. Also, the output is hard to read for large bitmaps.
>>
>> Sample output generated by gtest:
>>
>>
>> [0.292s][info][test] Bitmap (0 bits):
>> [0.292s][info][test] Bitmap (128 bits):
>> [0.292s][info][test] 0: ........ ........ ........ ........ ........ ........ ........ ........
>> [0.292s][info][test] 64: S....... ........ ........ ........ ........ ........ ........ ........
>> [0.292s][info][test] Bitmap (1024 bits):
>> [0.292s][info][test] 0: ........ ........ ........ ........ ........ ........ ........ ........
>> [0.292s][info][test] 64: ........ ........ ........ ........ ........ ........ ........ ........
>> [0.292s][info][test] 128: ........ ........ ........ ........ ........ ........ ........ ........
>> [0.292s][info][test] 192: ........ ........ ........ ........ ........ ........ ........ ........
>> [0.292s][info][test] 256: ........ ........ ........ ........ ........ ........ ........ ........
>> [0.292s][info][test] 320: ........ ........ ........ ........ ........ ........ ........ ........
>> [0.292s][info][test] 384: ........ ........ ........ ........ ........ ........ ........ ........
>> [0.292s][info][test] 448: ........ ........ ........ ........ ........ ........ ........ ........
>> [0.292s][info][test] 512: S....... ........ ........ ........ ........ ........ ........ ........
>> [0.292s][info][test] 576: ........ ........ ........ ........ ........ ........ ........ ........
>> [0.292s][info][test] 640: ........ ........ ........ ........ ........ ........ ........ ........
>> [0.292s][info][test] 704: ........ ........ ........ ........ ........ ........ ........ ........
>> [0.292s][info][test] 768: ........ ........ ........ ........ ........ ........ ........ ........
>> [0.292s][info][test] 832: ........ ........ ........ ........ ........ ........ ........ ........
>> [0.292s][info][test] 896: ........ ........ ........ ........ ........ ........ ........ ........
>> [0.292s][info][test] 960: ........ ........ ........ ........ ........ ........ ........ ........
>>
>>
>> It becomes clearer that bits 64 and 512 are set, respectively.
>>
>> Additional testing:
>> - [x] Linux x86_64 fastdebug, new gtest
>> - [x] Linux x86_64 release, new gtest
>
> Aleksey Shipilev has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains three additional commits since the last revision:
>
> - Merge branch 'master' into JDK-8287661-bitmaps-improv
> - Review comments
> - Fix
Any other opinions? I'll integrate it otherwise.
-------------
PR: https://git.openjdk.java.net/jdk/pull/8970
More information about the hotspot-dev
mailing list