-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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-8269571: NMT should print total malloc bytes and invocation count #4622
JDK-8269571: NMT should print total malloc bytes and invocation count #4622
Conversation
👋 Welcome back stuefe! A progress list of the required criteria for merging this PR into |
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.
Good to me.
@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 8 new commits pushed to the
Please see this link for an up-to-date comparison between the source branch of this pull request and the ➡️ To integrate this PR with the above commit message to the |
Thank you @zhengyu123 |
your change looks good to me.
I think 13669 is the invocation count of malloc(). Out of curiosity, may I know how to use it? Do you intend to use this to pinpoint memleak from malloc()? A straight malloc() icount may not help much. Is it possible we can have the number of unbalanced malloc()? That is icount of malloc() minus icount of free(). of course, it is not directly related to this PR. |
Thanks!
That count is not the invocation counter (which can be useful too under certain conditions) but the number of outstanding allocations. |
/integrate |
Going to push as commit 3ad20fc.
Your commit was automatically rebased without conflicts. |
|
At the moment NMT prints a total of reserved and committed bytes. If one wants to know how much C-Heap the VM uses, one needs to add all numbers from the sub categories.
It would be helpful would NMT print the total number of malloced memory and additionally the malloc invocation count.
This patch modifes the printout to print, in addition to totals, the number of malloced bytes, malloc invocation counts, and number of mmap reserved/committed bytes. This mirrors the way we print individual sub categories and allocation sites.
Before:
After:
Tests: Ran hotspot/runtime/NMT jtreg tests.
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/4622/head:pull/4622
$ git checkout pull/4622
Update a local copy of the PR:
$ git checkout pull/4622
$ git pull https://git.openjdk.java.net/jdk pull/4622/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 4622
View PR using the GUI difftool:
$ git pr show -t 4622
Using diff file
Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/4622.diff