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

JDK-8298298: NMT: count deltas are printed with 32-bit signed size #11568

Closed

Conversation

tstuefe
Copy link
Member

@tstuefe tstuefe commented Dec 7, 2022

Deltas for counts in NMT differential reports are shown as signed int, restricting them to +-2g. These counts are number of malloc blocks, or number of classes, or number of threads. In all cases number of physically existing somethings.

On large 64-bit machines they can conceivably overflow. Well, at least the malloc block counters. Granted, mallocing even just >2g number of 1 byte blocks costs about 40-50GB due to overhead in libc and NMT (on glibc). But it is conceivable.

Patch changes delta printing from int to ssize_t.

Note that I don't worry about overflowing SSIZE_MIN or SSIZE_MAX here. That would be ridiculous: we just cannot have that many physically existing things. Not on 64bit, not even on 32-bit where ssize_t is int, since in both cases the address space would be the limit. So, if the counters are that large, we have a different problem (probably counter overflow), and so we assert, resp. in release, ignore it.

Note we have the same problem with diff sizes. I expect 8281213 to fix that.


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-8298298: NMT: count deltas are printed with 32-bit signed size

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk pull/11568/head:pull/11568
$ git checkout pull/11568

Update a local copy of the PR:
$ git checkout pull/11568
$ git pull https://git.openjdk.org/jdk pull/11568/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 11568

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/11568.diff

@bridgekeeper
Copy link

bridgekeeper bot commented Dec 7, 2022

👋 Welcome back stuefe! 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
Copy link

openjdk bot commented Dec 7, 2022

@tstuefe 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 Dec 7, 2022
@tstuefe tstuefe marked this pull request as ready for review December 7, 2022 17:49
@tstuefe
Copy link
Member Author

tstuefe commented Dec 7, 2022

Tested: fastdebug and release for 32-bit/64-bit, runtime/NMT and NMT gtests

@openjdk openjdk bot added the rfr Pull request is ready for review label Dec 7, 2022
@mlbridge
Copy link

mlbridge bot commented Dec 7, 2022

Copy link
Member

@shipilev shipilev left a comment

Choose a reason for hiding this comment

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

Looks okay to me.

@shipilev
Copy link
Member

shipilev commented Dec 8, 2022

Windows builds are failing in GHA, though.

@openjdk
Copy link

openjdk bot commented Dec 8, 2022

@tstuefe 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:

8298298: NMT: count deltas are printed with 32-bit signed size

Reviewed-by: shade, dholmes

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 26 new commits pushed to the master branch:

  • e3c6cf8: 8298380: Clean up redundant array length checks in JDK code base
  • 33d955a: 8298345: Fix another two C2 IR matching tests for RISC-V
  • cb766c5: 8297778: Modernize and improve module jdk.sctp
  • 11aece2: 8257197: Add additional verification code to PhaseCCP
  • 7f9c6ce: 8297679: InvocationTargetException field named target is not declared final
  • 5540a8c: 8298083: The "CheckBox/RadioButton[Enabled/Disabled].textForeground" stoped working
  • c16eb89: 8298138: Shenandoah: HdrSeq asserts "sub-bucket index (512) overflow for value ( 1.00)"
  • 3dfadee: 8292289: [vectorapi] Improve the implementation of VectorTestNode
  • d35e840: 8297295: Remove ThreadGroup.allowThreadSuspension
  • 175e3d3: 8296149: Start of release updates for JDK 21
  • ... and 16 more: https://git.openjdk.org/jdk/compare/1166c8e2c0047869cd50b7ddc5355290ac2a695a...master

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 Dec 8, 2022
@tstuefe
Copy link
Member Author

tstuefe commented Dec 8, 2022

Looks okay to me.

Thanks!

Windows builds are failing in GHA, though.

Really, Windows? No SSIZE_MAX? Sigh

Copy link
Member

@dholmes-ora dholmes-ora left a comment

Choose a reason for hiding this comment

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

Seems reasonable.

Thanks.

@tstuefe
Copy link
Member Author

tstuefe commented Dec 9, 2022

Seems reasonable.

Thanks.

Thanks, David!

@tstuefe
Copy link
Member Author

tstuefe commented Dec 9, 2022

All tests are good.

/integrate

@openjdk
Copy link

openjdk bot commented Dec 9, 2022

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

  • 9346535: 8298320: Typo in the comment block of catch_inline_exception
  • b30b464: 8297036: Generalize C2 stub mechanism
  • 05b0a01: 8298281: Serial: Refactor MarkAndPushClosure
  • e3c6cf8: 8298380: Clean up redundant array length checks in JDK code base
  • 33d955a: 8298345: Fix another two C2 IR matching tests for RISC-V
  • cb766c5: 8297778: Modernize and improve module jdk.sctp
  • 11aece2: 8257197: Add additional verification code to PhaseCCP
  • 7f9c6ce: 8297679: InvocationTargetException field named target is not declared final
  • 5540a8c: 8298083: The "CheckBox/RadioButton[Enabled/Disabled].textForeground" stoped working
  • c16eb89: 8298138: Shenandoah: HdrSeq asserts "sub-bucket index (512) overflow for value ( 1.00)"
  • ... and 19 more: https://git.openjdk.org/jdk/compare/1166c8e2c0047869cd50b7ddc5355290ac2a695a...master

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Dec 9, 2022

@tstuefe Pushed as commit f729f5b.

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

@tstuefe tstuefe deleted the JDK-8298298-nmt-count-deltas-32-bit branch February 15, 2023 06:46
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
3 participants