-
Notifications
You must be signed in to change notification settings - Fork 6.2k
8331858: [nmt] VM.native_memory statistics should work in summary mode #19179
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
Conversation
|
👋 Welcome back szaldana! A progress list of the required criteria for merging this PR into |
|
@SoniaZaldana 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 74 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. As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@tstuefe, @jdksjolen) but any other Committer may sponsor as well. ➡️ To flag this PR as ready for integration with the above commit message, type |
|
@SoniaZaldana The following label 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 list. If you would like to change these labels, use the /label pull request command. |
Webrevs
|
tstuefe
left a comment
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.
Thanks for doing this. Minor nits, okay otherwise.
src/hotspot/share/nmt/memTracker.cpp
Outdated
| * Copyright (c) 2012, 2023, Oracle and/or its affiliates. All rights reserved. | ||
| * Copyright (c) 2020, 2023 SAP SE. All rights reserved. | ||
| * Copyright (c) 2012, 2024, Oracle and/or its affiliates. All rights reserved. | ||
| * Copyright (c) 2020, 2024 SAP SE. All rights reserved. |
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.
Please only adjust Oracle or RedHat copyrights, not from other companies
src/hotspot/share/nmt/nmtDCmd.cpp
Outdated
| } else if (_statistics.value()) { | ||
| if (check_detail_tracking_level(output())) { | ||
| NMT_TrackingLevel tracking = MemTracker::tracking_level(); | ||
| if (tracking == NMT_detail || tracking == NMT_summary) { |
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.
I think there is an "is_enabled" method in MemTracker that checks for both states. Please use that.
src/hotspot/share/nmt/nmtDCmd.cpp
Outdated
| if (tracking == NMT_detail || tracking == NMT_summary) { | ||
| MemTracker::tuning_statistics(output()); | ||
| } else { | ||
| output()->print_cr("Detail or summary tracking is not enabled"); |
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.
I'd just say "NMT not enabled"
|
Thanks @tstuefe! I made the updates. |
tstuefe
left a comment
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 for me.
| out->print_cr("State: %s", | ||
| NMTUtil::tracking_level_to_string(_tracking_level)); | ||
| if (_tracking_level == NMT_detail) { | ||
| out->print_cr("Malloc allocation site table size: %d", | ||
| MallocSiteTable::hash_buckets()); | ||
| out->print_cr(" Tracking stack depth: %d", | ||
| NMT_TrackingStackDepth); | ||
| out->cr(); | ||
| MallocSiteTable::print_tuning_statistics(out); | ||
| out->cr(); | ||
| } | ||
| out->print_cr("Preinit state:"); |
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.
Is there any functional difference here or is it only changing indentation?
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 @jdksjolen, are you referring to the indentation printing the tracking level? I can definitely revert the indentation there.
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.
Aha, I see, you added an if branch there! It was hard to see with the styling change on top. I think it's fine as is.
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.
No worries, thanks for the review!
jdksjolen
left a comment
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.
Approved!
|
/integrate |
|
@SoniaZaldana |
|
/sponsor |
|
Going to push as commit 5a4415a.
Your commit was automatically rebased without conflicts. |
|
@tstuefe @SoniaZaldana Pushed as commit 5a4415a. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
Hi all,
This PR addresses 8331858 enabling the "statistics" sub-option for jcmd VM.native_memory.
Since 8256844, preinit state gets printed under "statistics" and this is also relevant for the summary state.
Testing:
Thanks!
Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/19179/head:pull/19179$ git checkout pull/19179Update a local copy of the PR:
$ git checkout pull/19179$ git pull https://git.openjdk.org/jdk.git pull/19179/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 19179View PR using the GUI difftool:
$ git pr show -t 19179Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/19179.diff
Webrev
Link to Webrev Comment