From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10165 invoked by alias); 1 Apr 2012 09:19:57 -0000 Received: (qmail 10155 invoked by uid 22791); 1 Apr 2012 09:19:56 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED X-Spam-Check-By: sourceware.org Received: from adamg.eu (HELO adamg.eu) (91.192.224.99) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 01 Apr 2012 09:19:39 +0000 Received: from mail.agmk.net ([91.192.224.71]:41313 ident=postfix) by adamg.eu with esmtp (Exim 4.77) (envelope-from ) id 1SEGwj-00049r-HA; Sun, 01 Apr 2012 11:19:37 +0200 Received: from localhost.localnet (unknown [89.78.237.144]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: pluto@agmk.net) by mail.agmk.net (Postfix) with ESMTPSA id 4F04D203015A; Sun, 1 Apr 2012 11:19:37 +0200 (CEST) From: =?utf-8?B?UGF3ZcWC?= Sikora To: Jan Kratochvil Cc: gdb@sourceware.org Subject: Re: very slow gdb stepping. Date: Sun, 01 Apr 2012 09:19:00 -0000 Message-ID: <1779173.Fpv35T44XV@localhost> User-Agent: KMail/4.8.0 (Linux/3.3.0-3; KDE/4.8.2; x86_64; ; ) In-Reply-To: <20120331215613.GA1439@host2.jankratochvil.net> References: <1809128.jWeFzAnxpv@localhost> <20120331215613.GA1439@host2.jankratochvil.net> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2012-04/txt/msg00000.txt.bz2 On Saturday 31 of March 2012 23:57:18 Jan Kratochvil wrote: > On Sat, 31 Mar 2012 15:05:09 +0200, Pawe=C5=82 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/ >=20 > 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. >=20 > 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=3Dgdb.git;a=3Dcommitdiff;h=3Dea0= fcb4584cb04c938e32e44ad21a04c6225c5a1 > -> > 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 >=20 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=20 (e.g. libstdc++, boost and common application headers). moreover the gdb performs deduce_language_from_filename for each file *twice* (buildsym.c:58= 5 and :607). finally 'set language c++' doesn't disable auto deducing :(