From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15023 invoked by alias); 11 Feb 2008 20:52:29 -0000 Received: (qmail 15015 invoked by uid 22791); 11 Feb 2008 20:52:29 -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; Mon, 11 Feb 2008 20:52:02 +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 PAA20736; Mon, 11 Feb 2008 15:37:25 -0500 Received: from [10.42.100.129] (dhcp-100-129 [10.42.100.129]) by smtp.ott.qnx.com (8.8.8/8.6.12) with ESMTP id PAA09507; Mon, 11 Feb 2008 15:51:59 -0500 Message-ID: <47B0B56F.4010607@qnx.com> Date: Mon, 11 Feb 2008 20:52: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> In-Reply-To: <20080211203809.GA29560@caradoc.them.org> 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/msg00183.txt.bz2 Daniel Jacobowitz wrote: > On Mon, Feb 11, 2008 at 03:23:35PM -0500, Aleksandar Ristovski wrote: >> The attached patch checks if partial_symbol has already been added to the >> list instead of adding duplicate records. > > How does this ever happen? It seems very wrong. Also, I am worried > that the linear search will be a bottleneck (this is quadratic as each > psymtab grows). Yes, I understand your concern about the complexity... but... As a reference point, the binary I was mentioning here: http://sourceware.org/ml/gdb-patches/2008-02/msg00174.html with 9M+ partial symbols, after the patch it dropped to below 100K partial symbols: Statistics: Number of psymtabs : 16659 Number of global symbols : 98286 Number of static symbols : 59275 Number of glob. sym. sorts : 4 Now the sorting is much less costly. > > > Even easier: eliminate the copy entirely. SYMBOL_SET_NAMES -> symbol_set_names > already does this and it never modifies its argument. > I will take a look.