function call return path optimization

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



If function a() calls b() and b() calls c(), gcc recognize that if c() is the last function in b() and optimized a code path that returns to a() directly from c().

This optimization confuses a run time profiler that looks at the current call frame to determine the caller.  So in the above case, inside function c(), it looks like it was called from a().  But from source level, c() is called from b().

Is there a way to turn just that optimization off?  I still need the -O2 option to keep other optimization.

The gcc version I'M using is 3.3 and is on ia64 platform.


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux