|
|
|
|
|
by account42
914 days ago
|
|
Note that even without -fomit-frame-pointer, the compiler can still omit the frame pointer for in some cases. From the GCC documentation: > Note that -fno-omit-frame-pointer doesn’t guarantee the frame pointer is used in all functions. Several targets always omit the frame pointer in leaf functions. Fully inlined functions also won't have a seperate stack frame at all. I imaging that is is a big part why the perf impact of turning the frame pointer back on is as small as it is. It however also means that a complete stack trace will still require using debugging information, in which case you don't really need a frame pointer at all. |
|