Remarks on SFrame
SFrame is a new stack walking format for userspace profiling, inspired by Linux's in-kernel ORC unwind format.
While SFrame eliminates some .eh_frame CIE/FDE overhead, it sacrifices functionality (e.g., personality, LSDA, callee-saved registers) and flexibility, and its stack offsets are less compact than .eh_frame's bytecode-style CFI instructions.
In llvm-project executables I've tested on x86-64, .sframe section is 20% larger than .eh_frame.
It also remains significantly larger than highly compact schemes like Windows ARM64 unwind codes.
SFrame describes three elements for each function:
Canonical Frame Address (CFA): The base address for stack frame calculations
Return address
Frame pointer
An .sframe section follows a straightforward layout:
Header: Contains metadata and offset information
Auxiliary header (optional): Reserved for future extensions
Function Descriptor Entries (FDEs): Array describing each function
Frame Row Entries (FREs): Arrays of unwinding information per function
…
MaskRay