Consider not using the Frame Pointer Optimization when building your software
Stack tracing is a very useful functionality for tracking both the causes of performance problems and reliability issues. With Frame Pointer Optimization disabled, one can easily build the call chain by walking through the stack frame pointers.
Because of potential code size increase and performance degradation, Independent Software Vendors tend to use the /Oy C++ compiler option when building their software.
The Windows group performed some testing years ago to verify those beliefs and they concluded that the benefits of not using this optimization were bigger than the minimal cost it implied. Additionally, one of the gentlemen who performed those measurements at the time told me that for modern machines, there should be no noticeable performance difference.
I just want to encourage you to turn off FPO and if you don’t believe us, please do your own testing and see if you want to follow our advice. It will help both of us!
More detailed information courtesy of Ken:
- Frame pointer omission (FPO) optimization and consequences when debugging, part 1
- Frame pointer omission (FPO) optimization and consequences when debugging, part 2
Tchau.