# Stack walking: space and time trade-offs

DevFeed: [Stack walking: space and time trade-offs](<https://devfeed.tech/articles/stack-walking-space-and-time-trade-offs-31136.md>)

Original publisher: [Read original article](<https://maskray.me/blog/stack-walking-space-and-time-trade-offs>)

Published: 2025-10-26T07:00:00Z

Content type: article

Language: en

Sources: [MaskRay](<https://devfeed.tech/sources/maskray.md>)

Topics: [LLVM](<https://devfeed.tech/topics/llvm.md>), [Linux](<https://devfeed.tech/topics/linux.md>), [C++](<https://devfeed.tech/topics/c-plus-plus.md>)

Tags: [article](<https://devfeed.tech/tags/article.md>), [gcc](<https://devfeed.tech/tags/gcc.md>), [linux](<https://devfeed.tech/tags/linux.md>), [llvm](<https://devfeed.tech/tags/llvm.md>), [performance-analysis](<https://devfeed.tech/tags/performance-analysis.md>), [platforms](<https://devfeed.tech/tags/platforms.md>), [required](<https://devfeed.tech/tags/required.md>), [sframe](<https://devfeed.tech/tags/sframe.md>), [update](<https://devfeed.tech/tags/update.md>)

## AI overview

This article examines space and time trade-offs among stack-walking mechanisms on Linux, including DWARF, frame pointers, SFrame, LLVM's Compact Unwinding Format, Last Branch Record, and CET Shadow Stack. It analyzes the size overhead of enabling non-DWARF mechanisms when building LLVM executables; runtime performance analysis is deferred to a future update.

## Source excerpt

On most Linux platforms (except AArch32, which uses .ARM.exidx), DWARF .eh_frame is required for C++ exception handling and stack unwinding to restore callee-saved registers. While .eh_frame can be used for call trace recording, it is often criticized for its runtime overhead. As an alternative, developers can enable frame pointers, or adopt SFrame, a newer format designed specifically for profiling. This article examines the size overhead of enabling non-DWARF stack walking mechanisms when building several LLVM executables. Runtime performance analysis will be added in a future update.