public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug debug/29792]  New: DWARF: Not all inline concrete instances are being generated
@ 2006-11-10  2:55 acme at mandriva dot com
  2006-11-10  3:09 ` [Bug debug/29792] " pinskia at gcc dot gnu dot org
                   ` (11 more replies)
  0 siblings, 12 replies; 16+ messages in thread
From: acme at mandriva dot com @ 2006-11-10  2:55 UTC (permalink / raw)
  To: gcc-bugs

I'm working on tools to use the DWARF information to do several things, such as
finding holes in structures, help in finding inline functions to uninline, etc,
the tools are available at this git repository:
http://www.kernel.org/git/?p=linux/kernel/git/acme/pahole.git;a=summary

One of the tools is called pfunct and one of its outputs is:

/* /pub/scm/linux/kernel/git/acme/net-2.6.20/kernel/sched.c:4107 */
int sched_setscheduler(struct task_struct * p, int policy, struct sched_param *
param);

/* inline expansions in sched_setscheduler:
current_thread_info: 7
unlock_task_sighand: 5
get_current: 9
__raw_local_irq_save: 3
task_running: 6
resched_task: 11
raw_local_irq_restore: 2
raw_local_irq_restore: 8
resched_task: 13
*/
[acme@newtoy net-2.6.20]$

I.e. it searches in DW_TAG_subprogram trees for DW_TAG_inlined_subroutine
entries, and uses the DW_AT_high_pc, DW_AT_low_pc and DW_AT_ranges to print the
size of each inline expansion.

Another tool goes thru the functions return types, parameter list, variables in
all lexical blocks, inline expansions and recursively counts the references to
the various tags, in the end it looks for entries that aren't referenced to
help in reorganizing includes definitions, etc.

In doing this I noticed that not all concrete inline instances are being
emitted, such as __task_rq_lock, a inline function, used in sched_setscheduler
in the above example, several other cases aren't also emitted, and this is
confirmed by using elfutils's readelf as well as binutils equivalent tools.

Searching for similar problems I've found the 19191 ticket, where the problem
was worse, no concrete inline were being emitted, now most are being emitted,
but not all, is this a know issue?

More information, dumps, whatever I can do to help in fixing this problem can
be provided if requested.

This is my first ticket ever for gcc bugzilla, so here are more info:

[acme@newtoy net-2.6.20]$ gcc -v
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: /home/acme/svn/gcc/configure --prefix=/home/acme/gcc-cvs
--enable-languages=c --with-dwarf2 --enable-targets=i686-mandriva-linux-gnu
--disable-nls --with-gmp=/home/acme/gcc-infrastructure
--with-mpfr=/home/acme/gcc-infrastructure
Thread model: posix
gcc version 4.3.0 20061108 (experimental)
[acme@newtoy net-2.6.20]$

But the same problem happens at least with:

[acme@newtoy net-2.6.20]$ gcc -v
Using built-in specs.
Target: i586-mandriva-linux-gnu
Configured with: ../configure --prefix=/usr --libexecdir=/usr/lib
--with-slibdir=/lib --mandir=/usr/share/man --infodir=/usr/share/info
--enable-shared --enable-threads=posix --enable-checking=release
--enable-languages=c,c++,ada,fortran,objc,obj-c++,java
--host=i586-mandriva-linux-gnu --with-cpu=generic --with-system-zlib
--enable-long-long --enable-__cxa_atexit --enable-clocale=gnu
--disable-libunwind-exceptions --enable-java-awt=gtk
--with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre --enable-gtk-cairo
--enable-ssp --disable-libssp
Thread model: posix
gcc version 4.1.1 20060724 (prerelease) (4.1.1-3mdk)
[acme@newtoy net-2.6.20]$

I've been using Ulrich Drepper's excellent libdw DWARF library, found in the
elfutils package.


-- 
           Summary: DWARF: Not all inline concrete instances are being
                    generated
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: debug
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: acme at mandriva dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29792


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2006-11-16  1:53 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-11-10  2:55 [Bug debug/29792] New: DWARF: Not all inline concrete instances are being generated acme at mandriva dot com
2006-11-10  3:09 ` [Bug debug/29792] " pinskia at gcc dot gnu dot org
2006-11-10  3:19 ` acme at mandriva dot com
2006-11-10  3:20 ` acme at mandriva dot com
2006-11-12  8:35 ` pinskia at gcc dot gnu dot org
2006-11-12 20:39 ` acme at mandriva dot com
2006-11-13 16:00   ` Daniel Berlin
2006-11-13 12:24 ` acme at mandriva dot com
2006-11-13 16:00 ` dberlin at dberlin dot org
2006-11-13 16:17 ` acme at mandriva dot com
2006-11-14  4:53   ` Daniel Berlin
2006-11-14  4:53 ` dberlin at dberlin dot org
2006-11-14 17:19 ` acme at mandriva dot com
2006-11-15  3:55   ` Daniel Berlin
2006-11-15  3:55 ` dberlin at dberlin dot org
2006-11-16  1:53 ` acme at mandriva dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).