Integrated: 8287661: Fix and improve BitMap::print_on(outputStream*)
Aleksey Shipilev
shade at openjdk.java.net
Fri Jun 3 07:27:32 UTC 2022
On Wed, 1 Jun 2022 10:04:05 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
This pull request has now been integrated.
Changeset: 625821da
Author: Aleksey Shipilev <shade at openjdk.org>
URL: https://git.openjdk.java.net/jdk/commit/625821dae7589b510de00ffd506a592ddb606318
Stats: 36 lines in 2 files changed: 33 ins; 0 del; 3 mod
8287661: Fix and improve BitMap::print_on(outputStream*)
Reviewed-by: stefank
-------------
PR: https://git.openjdk.java.net/jdk/pull/8970
More information about the hotspot-dev
mailing list