Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8287661: Fix and improve BitMap::print_on(outputStream*) #8970

Closed
wants to merge 3 commits into from

Conversation

shipilev
Copy link
Member

@shipilev shipilev commented Jun 1, 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:

  • Linux x86_64 fastdebug, new gtest
  • Linux x86_64 release, new gtest

Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8287661: Fix and improve BitMap::print_on(outputStream*)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/8970/head:pull/8970
$ git checkout pull/8970

Update a local copy of the PR:
$ git checkout pull/8970
$ git pull https://git.openjdk.java.net/jdk pull/8970/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 8970

View PR using the GUI difftool:
$ git pr show -t 8970

Using diff file

Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/8970.diff

Sorry, something went wrong.

@bridgekeeper
Copy link

bridgekeeper bot commented Jun 1, 2022

👋 Welcome back shade! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk openjdk bot added the rfr Pull request is ready for review label Jun 1, 2022
@openjdk
Copy link

openjdk bot commented Jun 1, 2022

@shipilev The following label will be automatically applied to this pull request:

  • hotspot

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added the hotspot hotspot-dev@openjdk.org label Jun 1, 2022
@mlbridge
Copy link

mlbridge bot commented Jun 1, 2022

Webrevs

Copy link
Member

@stefank stefank left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great that you found this!

Copy link
Member

@stefank stefank left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! If we later change our mind about base 10 vs 2, we can revisit this.

@openjdk
Copy link

openjdk bot commented Jun 1, 2022

@shipilev This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

8287661: Fix and improve BitMap::print_on(outputStream*)

Reviewed-by: stefank

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 2 new commits pushed to the master branch:

  • 67ecd30: 8287398: Allow concurrent execution of hotspot docker tests
  • 8071b23: 8287237: (fs) Files.probeContentType returns null if filename contains hash mark on Linux

Please see this link for an up-to-date comparison between the source branch of this pull request and the master branch.
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Jun 1, 2022
@shipilev
Copy link
Member Author

shipilev commented Jun 2, 2022

Any other opinions? I'll integrate it otherwise.

@shipilev
Copy link
Member Author

shipilev commented Jun 3, 2022

/integrate

@openjdk
Copy link

openjdk bot commented Jun 3, 2022

Going to push as commit 625821d.
Since your change was applied there have been 34 commits pushed to the master branch:

  • b544b8b: 8276789: Support C++ lambda in ResourceHashtable::iterate
  • ba9ee8c: 8287748: Fix issues in java.lang.foreign package javadoc
  • deb0653: 8287337: SnippetUtils should throw exceptions if snippets not found
  • cbaeb00: 8287600: AA Ovals not rendered under metal
  • 2776ff3: 8276266: Clean up incorrect client-libs ProblemList.txt entries
  • 409157d: 8287125: [macos] Multiple jpackage tests fail/timeout on same host
  • b5a646e: 8287425: Remove unnecessary register push for MacroAssembler::check_klass_subtype_slow_path
  • 26048ea: 8287695: Use String.contains() instead of String.indexOf() in jdk.hotspot.agent
  • 37e1835: 8287746: ProblemList jni/nullCaller/NullCallerTest.java
  • 26d2426: 8287340: Refactor old code using StringTokenizer in locale related code
  • ... and 24 more: https://git.openjdk.java.net/jdk/compare/774928f9447e961ec26a76e03dbf2143ffdcc05d...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Jun 3, 2022
@openjdk openjdk bot closed this Jun 3, 2022
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Jun 3, 2022
@openjdk
Copy link

openjdk bot commented Jun 3, 2022

@shipilev Pushed as commit 625821d.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

@DamonFool
Copy link
Member

Any other opinions? I'll integrate it otherwise.

There seems to be a regression: #9029 .
Please have a look.
Thanks.

@shipilev shipilev deleted the JDK-8287661-bitmaps-improv branch June 23, 2022 11:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hotspot hotspot-dev@openjdk.org integrated Pull request has been integrated
Development

Successfully merging this pull request may close these issues.

None yet

3 participants