SFrame: The Simple Frame Stack Trace Format - Indu Bhagat, Oracle
Channel: The Linux Foundation
Date: 2023-05-25

SFrame: The Simple Frame Stack Trace Format - Indu Bhagat, Oracle

The SFrame format is a new stack trace format, the support for which we recently introduced into the GNU Toolchain. It represents the information needed for generating simple stack traces. The SFrame format keeps track of the minimal necessary information needed for stack tracing: Canonical Frame Address (CFA), Frame Pointer (FP), Return Address (RA). This format is designed for those applications which need fast, online stack traces, while relieving the need for them to preserve the frame pointer. This can be useful, for instance, in production-like environments, in which many constraints may exist. Support for the SFrame format is available in Binutils 2.40 (Spec: https://sourceware.org/binutils/docs/sframe-spec.html). This talk will introduce the format, its support in Binutils and showcase how simple it is to generate stack traces using SFrame. It will also discuss the next steps for the format and its adoption in the GNU/Linux ecosystem. Since this work was last presented, several new ideas and changes (including a new name) were implemented. This talk will cover the progress made since then, and discuss ideas for possible use cases. The talk will also showcase some libsframe APIs and show how to easily generate stack traces using SFrame.