-
Notifications
You must be signed in to change notification settings - Fork 6.2k
8266217: ZGC: Improve the -Xlog:gc+init output for NUMA #3778
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 jiefu! A progress list of the required criteria for merging this PR into |
|
/test |
|
@DamonFool |
|
@DamonFool The |
|
@DamonFool 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 13 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 |
|
Thanks @stefank for your review and help. |
|
|
||
| const char* ZNUMA::to_string() { | ||
| return _enabled ? "Enabled" : "Disabled"; | ||
| switch (_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.
Maybe consider to have a static const char* strings[] = {"Enabled", "Unsupported", "Disabled" }; (in the correct order) constant here and index by the array (and maybe an assert to catch out of bounds access if/when adds an entry and forgets to update this list).
This is typically more readable then a long switch case like this, but idk other people's opinions.
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.
And of course it's not a particular important suggestion, feel free to ignore.
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.
Maybe consider to have a
static const char* strings[] = {"Enabled", "Unsupported", "Disabled" };(in the correct order) constant here and index by the array (and maybe an assert to catch out of bounds access if/when adds an entry and forgets to update this list).
This is typically more readable then a long switch case like this, but idk other people's opinions.
Thanks @tschatzl for your review.
I didn't think of this skill before.
Thanks for your teaching.
Let's just keep it this time since there are only 3 cases for _state.
And I'd like to use your style of code next time.
Thanks.
Best regards,
Jie
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 like to keep the current proposal, since it's more inline with what we do in other places in ZGC, like ZLargePages::to_string().
pliden
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.
Looks good.
|
|
||
| const char* ZNUMA::to_string() { | ||
| return _enabled ? "Enabled" : "Disabled"; | ||
| switch (_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.
I'd like to keep the current proposal, since it's more inline with what we do in other places in ZGC, like ZLargePages::to_string().
Thanks @pliden . |
|
/integrate |
|
@DamonFool Since your change was applied there have been 33 commits pushed to the
Your commit was automatically rebased without conflicts. Pushed as commit 5ecef01. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
Hi all,
This patch improves the -Xlog:gc+init output for NUMA, which is suggested by StefanK [1].
The implementation just follows how UseLargePages are setup and printed.
Before (in docker, not support get_mempolicy)
After (in docker, not support get_mempolicy)
Testing:
Thanks.
Best regards,
Jie
[1] https://mail.openjdk.java.net/pipermail/hotspot-gc-dev/2020-March/028927.html
Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/3778/head:pull/3778$ git checkout pull/3778Update a local copy of the PR:
$ git checkout pull/3778$ git pull https://git.openjdk.java.net/jdk pull/3778/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 3778View PR using the GUI difftool:
$ git pr show -t 3778Using diff file
Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/3778.diff