From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6587 invoked by alias); 14 Feb 2008 01:31:50 -0000 Received: (qmail 6575 invoked by uid 22791); 14 Feb 2008 01:31:49 -0000 X-Spam-Check-By: sourceware.org Received: from qnxmail.qnx.com (HELO qnxmail.qnx.com) (209.226.137.76) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 14 Feb 2008 01:31:23 +0000 Received: from smtp.ott.qnx.com (smtp.ott.qnx.com [10.42.96.5]) by hub.ott.qnx.com (8.9.3/8.9.3) with ESMTP id UAA06037; Wed, 13 Feb 2008 20:16:28 -0500 Received: from [192.168.20.164] (pptp_vpn-20-164 [192.168.20.164]) by smtp.ott.qnx.com (8.8.8/8.6.12) with ESMTP id UAA03107; Wed, 13 Feb 2008 20:31:15 -0500 Message-ID: <47B399EA.3000800@qnx.com> Date: Thu, 14 Feb 2008 01:31:00 -0000 From: Aleksandar Ristovski User-Agent: Thunderbird 2.0.0.9 (Windows/20071031) MIME-Version: 1.0 To: Daniel Jacobowitz CC: gdb-patches@sourceware.org Subject: Re: [patch] Do not add partial_symbol again and again to the list References: <47B0AEC7.3070400@qnx.com> <20080211203809.GA29560@caradoc.them.org> <47B0B56F.4010607@qnx.com> <20080211210935.GA31767@caradoc.them.org> <47B0C0F4.4090302@qnx.com> <20080211214750.GA1953@caradoc.them.org> <47B0C7C6.9090605@qnx.com> <20080211223056.GA3833@caradoc.them.org> <47B0CF8A.6080306@qnx.com> <20080211225314.GA5832@caradoc.them.org> <47B27EB1.6030606@qnx.com> In-Reply-To: <47B27EB1.6030606@qnx.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2008-02/txt/msg00221.txt.bz2 Aleksandar Ristovski wrote: > > The patch: > > This revised patch adds global symbols only once to first partial symbol table > where the symbol was encountered, but only for namespace, > class_type, interface_type, union_type, enumeration_type and enumerator partial > symbol types (for the last two, only for java and cplus). > Here are some timings with a real-life binary. The time to load symbols for unpatched (gdb from current HEAD) is around 70 seconds, while the patched gdb needed less than 40 seconds. Almost 50% less for this particular binary which is built from c++ source using stl heavily. I have run tests (make check) and saw no regression; I also did other testing (many debugging sessions) and haven't seen anything broken, but if you can come up with a test case that breaks after the patch, I would be very interested to see. Note that the patch does not change anything about static partial symbols, only global psyms. $ cat ../nopatch.log GNU gdb 6.7.50.20080214-cvs Copyright (C) 2008 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "i686-pc-linux-gnu". Command execution time: 0.000000 Space used: 135168 (+0 for this command) +sym /tmp/at/libalib.so Command execution time: 69.076317 Space used: 36360192 (+36225024 for this command) +quit $ cat ../withpatch.log GNU gdb 6.7.50.20080213-cvs Copyright (C) 2008 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "i686-pc-linux-gnu". Command execution time: 0.000000 Space used: 135168 (+0 for this command) +sym /tmp/at/libalib.so Command execution time: 32.830052 Space used: 36319232 (+36184064 for this command) +quit