From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29083 invoked by alias); 14 May 2009 08:14:13 -0000 Received: (qmail 29074 invoked by uid 22791); 14 May 2009 08:14:11 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 14 May 2009 08:14:06 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 6347E2BACBF; Thu, 14 May 2009 04:14:04 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id e8HorxthTPRL; Thu, 14 May 2009 04:14:04 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 286AF2BACB9; Thu, 14 May 2009 04:14:04 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id 4FB3CF5A07; Thu, 14 May 2009 10:14:02 +0200 (CEST) Date: Thu, 14 May 2009 08:14:00 -0000 From: Joel Brobecker To: Paul Pluzhnikov Cc: gdb-patches@sourceware.org, Tom Tromey Subject: Re: [patch] Eliminate quadratic slow-down on number of solibs (part 2). Message-ID: <20090514081402.GF7292@adacore.com> References: <8ac60eac0905051749p3b5d14d9q8903b9de8e18137f@mail.gmail.com> <20090512082530.GD7584@adacore.com> <8ac60eac0905121353i4aae7110sebb34bec1de0d6d8@mail.gmail.com> <20090513092709.GB7292@adacore.com> <8ac60eac0905131111v7a73a628o5e6dfee5969119d3@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8ac60eac0905131111v7a73a628o5e6dfee5969119d3@mail.gmail.com> User-Agent: Mutt/1.5.18 (2008-05-17) 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: 2009-05/txt/msg00288.txt.bz2 > 3. The "don't reset all breakpoints over and over when adding > multiple solibs" patch here: > http://sourceware.org/ml/gdb-patches/2009-05/msg00097.html > > This patch feels like a hack, but does save significant additional > CPU cycles (even after patches #1 and #2 above) and transforms > breakpoint reset operation from O(N*N) into O(N) where N is the > number of solibs added "at once" (such as at program startup). It > is not clear how to make this less of a hack :-( I completely misunderstood this change you proposed! I see now what you are doing. This wouldn't help on systems such as Windows where DLLs are "discovered" through special events while waiting for inferior events. So shared libraries are never loaded at once, neither during startup or attaching. But on GNU/Linux, however, you're right, there is something to do in that case. I'd like to think about it, for a while... I wonder if we could use an observer to notify clients that symbols have been loaded, rather than calling breakpoint_re_set directly. > 4. Joel's proposal (if I understood it correctly) to extend patch#3 This proposal was a direct consequence of my misunderstanding. It might still have some merit on its own, but I don't think it is necessary (I thought that your change could cause incorrect behavior). -- Joel