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

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


> 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

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

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/8970/files
  - new: https://git.openjdk.java.net/jdk/pull/8970/files/a9aaf61f..921f646a

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8970&range=01
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8970&range=00-01

  Stats: 844 lines in 23 files changed: 321 ins; 416 del; 107 mod
  Patch: https://git.openjdk.java.net/jdk/pull/8970.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/8970/head:pull/8970

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


More information about the hotspot-dev mailing list