-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
[GR-42531] Debug info memory footprint improvements #5436
[GR-42531] Debug info memory footprint improvements #5436
Conversation
Heap Usage Report (as promised): |
5160df9
to
ee513ce
Compare
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 Andrew!
Did you by any chance measure wall time improvement as well in your expirements?
@zakkak Thanks for the review. I did not compare wall clock times -- I was running with full logging so the results would not have been very useful. I'll do a pair of before and after runs to see if there is any noticeable difference (modulo the fact that this is only a HelloWorld example). |
@zakkak For basic debuginfo before and after runs were both much the same -- best of two successive runs was before=1:16 vs after=1:15. However, for full debug info there was an apparent improvement of a few seconds - best of two successive runs was before=1:36 vs after=1:31. Not exactly scientific though :-) |
@zakkak ^^^ times above corrected |
Thanks @adinn ! |
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 a lot @adinn!
@fniephaus Thanks for the review. This appears to improve the problem reported by @lewurm significantly (see #5294 (comment) and #5294 (comment)). I think it would be worth pushing this now as is and relegating any further improvements -- including to the compiler or ELF code -- to a follow-up PR. |
@adinn did you identify any intermediate data structures that you are holding while generating dwarf debuginfo that could be deleted right after they got transformed into their final dwarf section data format? E.g. some data in a maps that could be deleted after their last use. In a similar effort to reduce memory pressure in EE this is how I was able to make lots of data available for GC so that the final debugObject.bake() step had much more memory budget to do it's job. |
I've some numbers from our CI to share on this, before:
After:
Those numbers aren't captured in a "benchmark approved environment" (e.g. other jobs could run on the same machine at the same time), but you can clearly see a trend 🙂 Thanks again Andrew. |
I have not yet tried that but I think it is very likely that this will provide further savings. Also, as we discussed offline I think we can achieve achieve further savings as follows: COMPILER
DWARF
|
I'll raise follow-up PRs for the above changes if/when I can show that they help. |
This PR implements significant improvements to debug info footprint. It only addresses changes local to the debug info generator. Although this is a great improvement the limited scope of the changes means that a large amount of the footprint that results from enabling of debug info is still present (debug info-related output by the compiler and ELF image modelling). An accompanying report (to be attached) identifies these overheads as well as the overheads addressed by this patch and suggests some areas where space savings might perhaps still be achieved in these other components.