-
Notifications
You must be signed in to change notification settings - Fork 5.9k
8307374: Add a JFR event for tracking RSS #14285
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
/label add hotspot |
👋 Welcome back stefank! A progress list of the required criteria for merging this PR into |
@stefank |
@stefank
|
/label add hotspot-jfr |
@stefank |
Webrevs
|
Thanks for proposing this enhancement, Stefan! I tried it out (on Linux) and it worked just fine.
I agree with naming it ResidentSetSize, even some popular operating system textbooks such as "the dinosaur book" use this term as a general concept. |
I agree. What's important is that end-users understand the concept. If there are differences between OS:es (worth mentioning) they can be stated in the description of the event, i.e. "On MacOs X is included, but not Y" |
Useful, but the user still needs to know how to interpret that number. Interpreting RSS is not straightforward. Therefore I like the name "ResidentSetSize", any other name would just add obfuscation. |
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. Want to add vsize while you are at it :) ?
@stefank 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 88 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.
Thanks again for this contribution, the Linux and OS-independent parts look good!
Thanks! :) I have a few other things that I need to do before RDP1. I can review a patch if someone publishes a PR ... |
Thanks for the reviews! |
Going to push as commit 5722903.
Your commit was automatically rebased without conflicts. |
Add A JFR event to track the resident set size (RSS) of the running process. This is a good complement to the new Native Memory Tracking events that were added for JDK 20 (JDK-8157023)
You can use the JDK Mission Control tool to extract this data. Or, you can use the new JFR Views tool to get a textual representation of the values:
The event has been implemented for Linux, MacOS, and Windows. The name ResidentSetSize isn't a perfect fit for the values extracted from MacOS and Windows, but I think it is better to name this after something that many people are familiar with instead of trying to find a generic name that fits all platforms. Do you agree with that, or should we change it to something else?
I've manually sanity checked that we get reasonable values on all OS:es. I've also added a jtreg test.
Progress
Issue
"3"
)Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/14285/head:pull/14285
$ git checkout pull/14285
Update a local copy of the PR:
$ git checkout pull/14285
$ git pull https://git.openjdk.org/jdk.git pull/14285/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 14285
View PR using the GUI difftool:
$ git pr show -t 14285
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/14285.diff
Webrev
Link to Webrev Comment