# compiler: Only omit frame pointers by default for ReleaseSmall\. · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/e62aac3ec4b21da20d7c57d937e508f2929138d0)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: e62aac3ec4b21da20d7c57d937e508f2929138d0

Requested commit: e62aac3ec4b21da20d7c57d937e508f2929138d0

Commit: e62aac3ec4b21da20d7c57d937e508f2929138d0

Tree: be5628cb1c50b0c2aa8ea9ea9ca017ec5b6e229c

Author: Alex Rønne Petersen

Committer: Andrew Kelley

## Message

```
compiler: Only omit frame pointers by default for ReleaseSmall.

Frame pointers make both debugging and profiling work better, and the overhead
is reportedly 1% or less for typical programs [0]. I think the pros outweigh the
cons here. People who *really* care about that 1% can simply use the
-fomit-frame-pointer option to reclaim it. For ReleaseSmall, though, it makes
sense to omit frame pointers by default for the sake of code size, as we already
strip the binary in this case anyway.

Closes #22161.

[0] https://www.brendangregg.com/blog/2024-03-17/the-return-of-the-frame-pointers.html

```

## Parents

- [ba37a4369b936c3fe4ad4f4b1d61bc93d9936018](https://git.cafe/gitcafe/zig/commit/ba37a4369b936c3fe4ad4f4b1d61bc93d9936018?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/e62aac3ec4b21da20d7c57d937e508f2929138d0?format=markdown)
