This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: symtab/2254: Symbol loading in GDB too slow


The following reply was made to PR symtab/2254; it has been noted by GNATS.

From: Daniel Jacobowitz <drow@false.org>
To: Thomas McGuire <Thomas.McGuire@gmx.net>
Cc: gdb-gnats@sources.redhat.com
Subject: Re: symtab/2254: Symbol loading in GDB too slow
Date: Mon, 16 Apr 2007 11:02:05 -0400

 On Mon, Apr 16, 2007 at 04:35:06PM +0200, Thomas McGuire wrote:
 > > Symbol table loading is already heavily optimized.  GDB can't give you
 > > miracles; how big are the libraries that you're trying to debug, 
 > Seems like the libraries are indeed quite big. After issuing ldd kmail (which gave me 100 different libraries), I used ls -l -h on some of them which I suspected to be the bigest:
 > 
 > 62M 2007-04-15 13:08 /media/kdedev/home/build/KDE/kdepim/lib/libkmailprivate.so.1.0.0
 > 7.6M 2007-04-10 22:36 /media/kdedev/home/kde/lib/libkde3support.so.5.0.0
 > 21M 2007-04-10 22:35 /media/kdedev/home/kde/lib/libkdecore.so.5.0.0
 > 15M 2007-04-15 13:16 /media/kdedev/home/kde/lib/libkdepim.so.5.0.0
 > 42M 2007-04-10 22:36 /media/kdedev/home/kde/lib/libkdeui.so.5.0.0
 > 54M 2007-04-10 22:37 /media/kdedev/home/kde/lib/libkhtml.so.5.0.0
 > 37M 2007-04-10 22:36 /media/kdedev/home/kde/lib/libkio.so.5.0.0
 > 3.3M 2007-03-28 00:08 /media/kdedev/home/qt-copy/lib/libQt3Support.so.4.3.0
 > 1.9M 2007-03-27 23:46 /media/kdedev/home/qt-copy/lib/libQtCore.so.4.3.0
 > 9.1M 2007-03-27 23:59 /media/kdedev/home/qt-copy/lib/libQtGui.so.4.3.0
 > 
 > >and how big are their debugging symbols?
 > What command can I use to find out?
 
 You can look at the size of .debug_info with readelf -S, but it won't
 tell us much; it's always roughly the same proportion of file size for
 C++.  I estimate you have about 150MB of DWARF-2 information (plus or
 minus a hundred percent :-).  DWARF-2 is designed to be compact on
 disk; useful memory representations tend to be bigger.
 
 I would be reluctant to debug KDE on something with <1GB RAM.
 
 > If it is already heavily optimized, do you think caching on disk would gain anything at all?
 
 Possibly, since it could be more easily paged out by the OS if we
 could use it unmodified.  But it would be a fair amount of work to
 design a useful cache.
 
 I think there are also some C++-specific optimizations possible.  For
 instance we waste some memory by our representation of demangled
 names, especially for templates.  I had a discussion the Michael Matz
 on the GCC list some months ago about this; it requires compiler
 assistance to get it right.
 
 -- 
 Daniel Jacobowitz
 CodeSourcery


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]