Bug 69011 - Inlined functions are no instrumented with -finstrument-functions
Inlined functions are no instrumented with -finstrument-functions
Product: Red Hat Raw Hide
Classification: Retired
Component: gcc (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
Depends On:
  Show dependency treegraph
Reported: 2002-07-16 18:38 EDT by Stefan Sorensen
Modified: 2008-05-01 11:38 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2002-07-16 18:38:53 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Test program (256 bytes, text/plain)
2002-07-16 18:38 EDT, Stefan Sorensen
no flags Details

  None (edit)
Description Stefan Sorensen 2002-07-16 18:38:12 EDT
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
Comment 1 Stefan Sorensen 2002-07-16 18:38:49 EDT
Created attachment 65585 [details]
Test program
Comment 2 Jakub Jelinek 2002-07-18 04:29:36 EDT
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.

Note You need to log in before you can comment on or make changes to this bug.