When compiling with -finstrument-functions, inlined functions are not instrumented. Example with main calling a single (possibly) inlined function: Without inlining: $ gcc -finstrument-functions -o foo foo.c $ ./foo this_fn=0x8048404 call_site=0x420165c4 this_fn=0x80483d6 call_site=0x804842d Both main and the called functions are instrumented. With inlining: $ gcc -O -finstrument-functions -o foo foo.c $ ./foo this_fn=0x8048404 call_site=0x420165c4 Only main has been instrumented. gcc version: 3.1-7
Created attachment 65585 [details] Test program
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.