On 18/11/2024 09.30, Richard Biener wrote:
I also object to enforce this for x86 32bit which is a very register starved architecture (x86-64 is only slightly better in this regard).
I think, we can leave i586 as is and just improve x86_64. It should have 8 additional general-purpose registers, so losing 1 of 15 is not as bad as losing 1 of 7 on i586. But I guess, most of the performance impact comes from the 3 extra instructions needed for save+restore of RBP. Is there an option to not use frame-pointers in small functions (where the performance-impact would be the largest) ? The "Shadow Stacks" alternative mentioned in [4] also sounds interesting. CPUs with this seem to be around for 6 years already... But it still needs code to use it. Not sure about other 64-bit architectures. aarch64, riscv, ppc64 - maybe later?
In any case - I propose shipping all packages with debug info included since that greatly improves the profiling experience - even more so than by enabling frame-pointers. Bandwidth and disk is cheap these days.
We have debuginfod these days that should allow to pull in required info on demand. And while desktop machines are very powerful these days, running VMs and containers greatly profits from small footprints. Ciao Bernhard M.
[4]: https://gitlab.archlinux.org/archlinux/rfcs/-/blob/master/rfcs/0026-fno-omit...