news.volyx.in

The return of the frame pointers (brendangregg.com)

684 points by mfiguiere · 883 days ago · 251 comments on HN

Article summary

The article discusses the return of frame pointers in Linux, which are used for stack walking and profiling. Frame pointers were removed in 2004 to improve performance, but this change broke some profiling tools. Recently, Fedora and Ubuntu have started compiling their libc with frame pointers by default, which should improve profiling capabilities. This change is expected to have a small performance overhead, typically less than 1%, but can be significant in some cases.

Main themes

  • Frame pointers
  • Linux performance
  • Profiling tools
  • Compiler optimizations
  • Debugging techniques

What commenters say

  • The removal of frame pointers in 2004 was a significant issue for profiling and debugging, and their return is a welcome change.
  • The performance overhead of frame pointers is negligible, and their benefits for profiling and debugging outweigh the costs.
  • The use of frame pointers can be optimized and improved with better tooling and techniques, such as caching unwind information.
  • The Java/JIT case is a significant exception where frame pointers are not sufficient, and alternative solutions are needed.
  • DWARF unwinding is not a viable alternative to frame pointers due to its high overhead and complexity.
  • The decision to omit frame pointers was made to improve performance, but it had significant consequences for profiling and debugging.
  • The return of frame pointers is a significant step forward for Linux performance analysis and debugging capabilities.
  • Alternative stack walking techniques, such as ORC and eBPF, may offer better performance and functionality than frame pointers in the future.