Earlier quoted context omitted.
Profiling tools have already solved the ability to reliably unwind in the absence of frame pointers[1], but there are plenty of tools that this kind of investment is simply too much that it won't ever happen, like bpftrace or bcc-tools. [1] https://www.polarsignals.com/blog/posts/2022/11/29/dwarf-bas...
Do those tools really need to implement their own unwinding though? This really should just need to be implemented once in a library and then used wherever unwinding is needed.
Ubuntu 24.04 LTS will enable frame pointers by default
111–120 of 121 posts
Re: Ubuntu 24.04 LTS will enable frame pointers by default
#112Frame pointers are such a destructive micro-optimization to omit by default, I am beyond excited about this collaboration with the folks at Canonical to make Ubuntu debuggable by default!
It's a "micro" optimization that can be automatically applied everywhere. And its not destructive because debug info contains all you need to calculate the frame pointers after the fact. Really a no-brainer to have it on unless you are dealing with broken tools.
[1] https://www.polarsignals.com/blog/posts/2022/11/29/dwarf-bas...
Re: Ubuntu 24.04 LTS will enable frame pointers by default
#113Earlier quoted context omitted.
> So the whole world should take a 1-2% performance penalty on everything so some users can maybe run a profiler? If so, I'm all for it. The win from easy access to profiling can dwarf this 1-2%
That's assuming you can't profile without frame pointers which is simply not true. If some tools have issues then fix them.
Re: Ubuntu 24.04 LTS will enable frame pointers by default
#114Earlier quoted context omitted.
I don't know where 1-2% comes from, but for many scale production workloads I studied it was so close to 0% that it was tough to measure beyond noise on the cloud. That's not to say that 1-2% is wrong, but that it's likely someone's workload and other people see less. Helping people find ~30-3000% perf wins, helping debugging and automated bug reports, is huge. For some sites it may be like 300 steps forward, one ste…
Eeven 0.1% scaled accross all users is a huge amount of wasted energy. You can profile without subjecting everyone to frame pointers.
Re: Ubuntu 24.04 LTS will enable frame pointers by default
#115Earlier quoted context omitted.
This option was almost certainly a holdover from the bad old 32-bit x86 days, when disabling frame pointers gave you a seventh valuable general-purpose register. It's no longer beneficial on x86_64 -- even with rbp locked down, you still have fourteen registers there.
Yeah, back in the 32 bit days -fomit-frame-pointer was the only optimization you could count on to really make a difference. It wasn't small either, often 10-15% speedup. No other flag on gcc would make even a full percentage difference in my testing. The Amd64 architecture fixed the underlying problem, so this is pretty much just a holdover. I'm surprised they even enabled it by default.
Re: Ubuntu 24.04 LTS will enable frame pointers by default
#116Earlier quoted context omitted.
Also, apparently Intel is planning to extend x86_64 to 32 GPRs, with an extension called... sigh [0]... Intel APX[1]. So the overhead of frame pointers will be even lower in the future. [0] Intel APX is extremely confusable with the iAPX 432, a failed non-x86 architecture Intel made that's completely unrelated to doubling the size of the x64 register file. [1] https://www.intel.com/content/www/us/en/developer/article…
iAPX has been dead for almost 40 years; there probably won't be much confusion.
Re: Ubuntu 24.04 LTS will enable frame pointers by default
#117Earlier quoted context omitted.
I've seen how instantly-available profiles affect the engineering culture on practice and it's transformative. The difference between "yeah strange, I'll deploy an fp build some time later and check... maybe" and "see this thing right here on the flamegraph" is huge and often repays 5-15x of the initial 1% slowdown.
This x1000 This "1%" loss will never manifest. It will be pure gain.
Re: Ubuntu 24.04 LTS will enable frame pointers by default
#118Re: Ubuntu 24.04 LTS will enable frame pointers by default
#119So the whole world should take a 1-2% performance penalty on everything so some users can maybe run a profiler? Wouldn't it make more sense to just have an 'apt reinstall all --with-frame-pointers' command that power users could run before they wanted to profile something?
I don't know where 1-2% comes from, but for many scale production workloads I studied it was so close to 0% that it was tough to measure beyond noise on the cloud. That's not to say that 1-2% is wrong, but that it's likely someone's workload and other people see less. Helping people find ~30-3000% perf wins, helping debugging and automated bug reports, is huge. For some sites it may be like 300 steps forward, one ste…
Right from the article. I find it a difficult subject, as a developer/poweruser I am happy to see framepointers. But I can not speak for others.
Re: Ubuntu 24.04 LTS will enable frame pointers by default
#120Earlier quoted context omitted.
This x1000 This "1%" loss will never manifest. It will be pure gain.
Single digit percentages are noise in moore-units. Layout has a bigger effect. So many "optimizations" in our tech culture are around removing the headlights and brakes so that the car can go slightly faster in the dark, on hills.
Stack traces and good performance profiles are table stakes to even starting to make good software imo