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
8255047: Add HotSpot UseDebuggerErgo flags #763
Conversation
/label add hotspot |
👋 Welcome back stefank! A progress list of the required criteria for merging this PR into |
@stefank |
Webrevs
|
Perhaps: Update: Yes, this is the way that I have always wished that |
@dcubed-ojdk Thanks for the suggestion. I like it. |
I've updated the patch with the suggestion from Dan. The flags now work as follows: |
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.
Thumbs up.
} | ||
#endif | ||
|
||
assert(id >= 0 && id < _processor_count, "Invalid processor id [%d]", id); |
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 adding the bad id value to the assert() output.
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!
Thanks,
David
Thanks @dcubed-ojdk and @dholmes-ora! |
/integrate |
@stefank This PR has not yet been marked as ready for integration. |
@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 73 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 |
/integrate |
@stefank Since your change was applied there have been 73 commits pushed to the
Your commit was automatically rebased without conflicts. Pushed as commit ae72b52. 💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored. |
Some debuggers don't work well with many threads, and/or incompletely restricts the number of used CPUs to one.
This flag is intended as a catch-all for HotSpot developers (not available in product builds) to allow us to more easily use those debuggers.
Currently, the proposal is to let the flag fix a few things:
(1) is purely ergonomics: gdb, rr, valgrind is faster and seems to work much better with fewer threads. The values would still be overridable by devs.
(2) and (3) deals with the fact that some debuggers change the reported processor count, but don't change the processor ids returned by sched_getcpu. This causes problems for ZGC and NUMA, that both assumes that they can rely on os::processor_id() < os::processor_count().
The current proposed flag name is -XX:+LimitedCPUsDebugging. I'm not entirely happy with that name, but I been able to find a better name.
An alternative to having one flag, is to split this into two flags, and maybe that would solve the naming problem. However, the usability aspects will be worse.
If we can't find a suitable name, I rather introduce a flag called:
-XX:DebuggerWorkarounds or -XX:DebuggerWorkaround1
Any suggestions / opinions? I really do want to at least fix the (2, 3) problem, because I keep having to add this to every single branch I'm working on.
Progress
Testing
Failed test task
Issue
Reviewers
Download
$ git fetch https://git.openjdk.java.net/jdk pull/763/head:pull/763
$ git checkout pull/763