Red Hat Bugzilla – Bug 69011
Inlined functions are no instrumented with -finstrument-functions
Last modified: 2008-05-01 11:38:03 EDT
When compiling with -finstrument-functions, inlined functions are not
instrumented. Example with main calling a single (possibly) inlined function:
$ gcc -finstrument-functions -o foo foo.c
Both main and the called functions are instrumented.
$ gcc -O -finstrument-functions -o foo foo.c
Only main has been instrumented.
gcc version: 3.1-7
Created attachment 65585 [details]
This is the expected behaviour until -finstrument-functions is reimplemented
on AST (it is currently down at RTL level and since AST inlining was introduced
(for C++ in 2.96-RH, for C in 3.0) thus -finstrument-functions code doesn't
see inlined function boundaries any longer.