This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: very slow gdb stepping.
- From: PaweÅ Sikora <pawel dot sikora at agmk dot net>
- To: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- Cc: gdb at sourceware dot org
- Date: Sun, 01 Apr 2012 11:19:32 +0200
- Subject: Re: very slow gdb stepping.
- References: <1809128.jWeFzAnxpv@localhost> <20120331215613.GA1439@host2.jankratochvil.net>
On Saturday 31 of March 2012 23:57:18 Jan Kratochvil wrote:
> On Sat, 31 Mar 2012 15:05:09 +0200, PaweÅ Sikora wrote:
> > during debugging a large c++ application an each gdb step (next or step-in)
> > takes from ~2 to ~30 seconds which is horribly slow and uncomfortable :(
> [...]
> > http://carme.pld-linux.org/~pluto/gdb-cpuhog/
>
> The name gdb-7.4.50-0.20120120 it suggests a snapshot with performance
> regression later already fixed on trunk by Tom Tromey. This performance
> regression was not present in 7.4 and it will not be present in 7.5.
>
> I have fixed this regression by a backport in 7.4.50.20120120-35.fc17,
> the 20120120 snapshot date may suggest your GDB is somehow Fedora derived.
> http://pkgs.fedoraproject.org/gitweb/?p=gdb.git;a=commitdiff;h=ea0fcb4584cb04c938e32e44ad21a04c6225c5a1
> ->
> FYI: remove extraneous block from dw2_map_symtabs_matching_filename
> http://sourceware.org/ml/gdb-patches/2012-02/msg00409.html
> FYI: fix some performance bugs with .gdb_index
> http://sourceware.org/ml/gdb-patches/2012-02/msg00413.html
>
didn't help too much. callgrind still shows zilion calls to glibc's strcmp
from filename_cmp and start_subfile. our c++ project contains lot of files:
$ find sources -type f -name '*.?pp' |wc -l
6947
$ find buildenv -type f -name '*.?pp' |wc -l
8906
on each step in 95% of cases gdb deduces language for the same files
(e.g. libstdc++, boost and common application headers). moreover the gdb
performs deduce_language_from_filename for each file *twice* (buildsym.c:585 and :607).
finally 'set language c++' doesn't disable auto deducing :(