-
Notifications
You must be signed in to change notification settings - Fork 6.2k
8374521: Support fine-grained native debug levels #29056
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 shade! A progress list of the required criteria for merging this PR into |
|
@shipilev 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 18 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 |
|
Motivational improvements in debug info sizes: Since debuginfo-s are duplicated several times in our build dir, we are scratching against the 14G guaranteed free space on GHA runners, and reducing to level=1 buys us a lot of headroom: |
|
Similar thing on MacOS AArch64 (Clang): |
Webrevs
|
make/autoconf/flags-cflags.m4
Outdated
| # Debug prefix mapping if supported by compiler | ||
| DEBUG_PREFIX_CFLAGS= | ||
| UTIL_ARG_WITH(NAME: fine-debug-level, TYPE: string, |
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.
How about debug-info-level?
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 I agree with this naming suggestion.
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.
--with-debug-info-level it is!
erikj79
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.
I think this is a good idea.
make/autoconf/flags-cflags.m4
Outdated
| # Debug prefix mapping if supported by compiler | ||
| DEBUG_PREFIX_CFLAGS= | ||
| UTIL_ARG_WITH(NAME: fine-debug-level, TYPE: string, |
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 I agree with this naming suggestion.
make/autoconf/flags-cflags.m4
Outdated
| UTIL_ARG_WITH(NAME: fine-debug-level, TYPE: string, | ||
| DEFAULT: 2, | ||
| RESULT: FINE_DEBUG_LEVEL, | ||
| DESC: [Sets the fine-tuned debug level, when debug info generation is 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 think we should clarify that this only applies to GCC and Clang.
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 added the blurb into description.
|
A few more touchups: moved the block to handle both compilers at the same time, stopped issuing |
RealCLanger
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 like a nice resource usage improvement
|
Thanks for reviews! I am thinking to align the option name with current |
|
OK, yes, that sounds like a good suggestion. |
Yes, that looks even better. |
|
Thanks! Here goes. /integrate |
|
Going to push as commit dd20e91.
Your commit was automatically rebased without conflicts. |
OK, no |
Dang. I have not pushed my local commit! Argh. I'll follow up with the update tomorrow. |
|
JDK-8374507 forced me to look into debug info sizes again. And I remembered that GCC actually have debug-level support, which can select what kind of diagnostic data is in the debug info. See: https://gcc.gnu.org/onlinedocs/gcc-4.5.0/gcc/Debugging-Options.html
Allowing users to configure the debug level allows two major deviations from the default level (2):
level=1: significantly reduce the debug info size, but still allow backtrace reconstruction
level=3: add even more debugging info, like macro expansion, into the debug data
This RFE upstreams the variant the patch that I have been using in builds.shipilev.net binaries: the fastdebug variants there are done with GCC level=1, greatly optimizing the debug binary sizes, while still maintaining the major benefit of debug binaries -- rich crash diagnostics.
I threw in this option into current GHA builds to conserve more disk space on runners and/or transfers.
I am open for bikeshedding on the option name :)
Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/29056/head:pull/29056$ git checkout pull/29056Update a local copy of the PR:
$ git checkout pull/29056$ git pull https://git.openjdk.org/jdk.git pull/29056/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 29056View PR using the GUI difftool:
$ git pr show -t 29056Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/29056.diff
Using Webrev
Link to Webrev Comment