From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6644 invoked by alias); 1 Apr 2012 10:44:38 -0000 Received: (qmail 6633 invoked by uid 22791); 1 Apr 2012 10:44:36 -0000 X-SWARE-Spam-Status: No, hits=-2.1 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 10:44:12 +0000 Received: from mail.agmk.net ([91.192.224.71]:44428 ident=postfix) by adamg.eu with esmtp (Exim 4.77) (envelope-from ) id 1SEIGY-0007Ps-G0; Sun, 01 Apr 2012 12:44:10 +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 33858203015A; Sun, 1 Apr 2012 12:44:10 +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 10:44:00 -0000 Message-ID: <2286853.N9pMrmdNeP@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/msg00001.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 one more observation: during stepping the collect_symtabs_from_filename is called many [*] times for the same file which looks suboptimal for large binaries and linear list scanning in start_subfile. [*] #0 collect_symtabs_from_filename (file=3D0x505b4f0 "ProjectManager.cpp") a= t linespec.c:2123 #1 0x000000000054c924 in symtabs_from_filename (user_filename=3D0x7fff5fc4= f2d0, is_quote_enclosed=3D, p=3D, argptr=3D0x= 7fff5fc4f5a0) at linespec.c:2175 #2 decode_line_internal (self=3D0x7fff5fc4f2b0, argptr=3D0x7fff5fc4f5a0) a= t linespec.c:912 #3 0x000000000054e1eb in decode_line_full (argptr=3D0x7fff5fc4f5a0, flags= =3D, default_symtab=3D, default_line=3D, canoni cal=3D0x7fff5fc4f3b0, select_mode=3D0x739a37 "all", filter=3D0x0) at linesp= ec.c:1223 #4 0x000000000050244a in decode_linespec_default (s=3D0x7fff5fc4f5a0, sals= =3D0x7fff5fc4f570, b=3D) at breakpoint.c:12300 #5 0x0000000000508fce in addr_string_to_sals (b=3D0x1dc7af0, addr_string= =3D, found=3D0x7fff5fc4f65c) at breakpoint.c:12159 #6 0x000000000050d44b in breakpoint_re_set_default (b=3D0x1dc7af0) at brea= kpoint.c:12235 #7 0x00000000004feff7 in breakpoint_re_set_one (bint=3D0x1dc7af0) at break= point.c:12350 #8 0x000000000056b1db in catch_errors (func=3D0x4fefb0 , func_args=3D0x1dc7af0, errstring=3D0x3e3a5b0 "Error in re-setting bre= akpoint 1: ", mask=3D6) at exceptions.c:546 #9 0x000000000050d5d2 in breakpoint_re_set () at breakpoint.c:12374 (...)