-
Notifications
You must be signed in to change notification settings - Fork 6k
JDK-8276983: Small fixes to DumpAllocStat::print_stats #6347
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-8276983: Small fixes to DumpAllocStat::print_stats #6347
Conversation
👋 Welcome back stuefe! A progress list of the required criteria for merging this PR into |
@tstuefe The following labels will be automatically applied to this pull request:
When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing lists. If you would like to change these labels, use the /label pull request command. |
9fab885
to
45a2c3c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi Thomas,
Seems okay. Relying on percent_of rather than passing in 1 does seem to change what will be output, but AFAICS we should never be able to pass zero in the first place.
Thanks,
David
@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:
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 28 new commits pushed to the
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Good clean up.
Thanks @dholmes-ora and @iklam ! /integrate |
Going to push as commit 296780c.
Your commit was automatically rebased without conflicts. |
When looking at CDS code in the context of Lilliput, I had to spend some time in DumpAllocStat::print(). I noticed two small things which can be fixed independently:
the divide-by-zero check at lines 45ff is not needed, since
percent_of
does this already. It also can cause the asserts at the end of the function to fire wrongly.About those asserts: it makes sense to flush the debug message before scope end, otherwise, we won't see the debug message if the asserts fire. If they fire, the debug message would be helpful.
I also improved the assert message somewhat. I noticed that all sizes in this method are
int
, but left it that way because changing it would have too many ripple effects. I guess we won't get CDS archives beyond int_max any time soon.Thanks, Thomas
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/6347/head:pull/6347
$ git checkout pull/6347
Update a local copy of the PR:
$ git checkout pull/6347
$ git pull https://git.openjdk.java.net/jdk pull/6347/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 6347
View PR using the GUI difftool:
$ git pr show -t 6347
Using diff file
Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/6347.diff