Fedora 37 Weighing Change To Improve Profiling/Debugging But With Possible Performance Cost

Written by Michael Larabel in Fedora on 23 June 2022 at 02:30 PM EDT. 15 Comments
FEDORA
Fedora developers are weighing adding an option to the default compilation flags for Fedora 37 that can enhance the performance profiling and debug-ability of generated packages but possible performance overhead implications -- possibly a few percent based on prior figures.

The change proposal being evaluated is about adding the "-fno-omit-frame-pointer" to the default compilation flags as a system-wide change. This compiler option will make sure for C/C++ programs that the frame pointer is always available so that debugging/profiling tools can use it for providing accurate performance data.

They hope this will lead to performance improvements in core libraries and executables, but by not omitting the frame pointer there are possible performance implications. The default behavior of not using the frame pointer can save three instructions per function and can treat the RBP frame/base pointer register as a general purpose register to be used for something else.

Meta/Facebook internal benchmarks found that building with "-fno-omit-frame-pointer" hadn't impacted two of their most performance-intensive applications. But data in 2017 from SUSE with a Linux 4.18 kernel showed that there were 5~10% regressions in some benchmarks.

Fedora developers do acknowledge the risk of this change regressing some workloads, to which the change proposal suggests individual packages could opt-out of this compiler flag change if they find their performance significantly impaired. The change proposal for Fedora 37 is being suggested by Facebook/Meta engineers.

The details on this change proposal can be found via the Fedora Wiki.

On the Fedora mailing list is much discussion already over this proposed "-fno-omit-frame-pointer" behavior by default and the possible negative impact it could have on performance. There's multiple individuals calling for more performance testing to better quantify the potential impact, including Phoronix benchmarking.

I haven't looked at "-fno-omit-frame-pointer" costs myself but will put that on my TODO list for some initial benchmarks at least for the impact of using "-fno-omit-frame-pointer" on standalone workloads/benchmarks while that may not capture the full impact of rebuilding the entire operating system with this change, at least it will have a starting point. It will be interesting to see what is decided by this proposed change for Fedora 37 given the possible performance hit to end-users in the name of a better performance profiling and debugging experience.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week