Implementing sframes
summary
sframes are implemented in binutils to let the kernel unwind user stacks without frame pointers by reading an ELF sframe section for static binaries, but user-space reads can fault so unwinding cannot run in NMI/interrupt context and instead uses irq_work defer to schedule a safe ptrace-path copy. Perf and ftrace need changes to avoid repeatedly copying identical user stacks. Dynamically linked objects and JIT code require a registration mechanism (system call or user-space table) so generated code can provide sframe metadata at load time.
AI-written summary · about
chapters (6)
- 0:00Stack tracing challenges
- 1:41The ORC unwinder
- 4:45Introduction of S frames
- 7:13Implementing S frames
- 10:55Performance and mapping
- 12:59JIT and future directions
related talks
01h 15mReliable Stack Traces, the Reality of Myth
01h 01m“How C++ Debuggers Work”
45mSupporting BPF in the GNU Toolchain
26mDesigning Syscalls for Extensibility
01h 02mMemory and Compilers
43mToolchains for the Future
31mToolchains for People in a Hurry: Latest Features of GCC/GLIBC
01h 04mThe Bits Between the Bits: How We Get to main()
