Bug 69011 - Inlined functions are no instrumented with -finstrument-functions
Summary: Inlined functions are no instrumented with -finstrument-functions
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Raw Hide
Classification: Retired
Component: gcc
Version: 1.0
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-07-16 22:38 UTC by Stefan Sorensen
Modified: 2008-05-01 15:38 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2002-07-16 22:38:53 UTC
Embargoed:


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

Description Stefan Sorensen 2002-07-16 22:38:12 UTC
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 22:38:49 UTC
Created attachment 65585 [details]
Test program

Comment 2 Jakub Jelinek 2002-07-18 08:29:36 UTC
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.