From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6350 invoked by alias); 13 May 2009 18:11:50 -0000 Received: (qmail 6116 invoked by uid 22791); 13 May 2009 18:11:48 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.33.17) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 13 May 2009 18:11:43 +0000 Received: from zps38.corp.google.com (zps38.corp.google.com [172.25.146.38]) by smtp-out.google.com with ESMTP id n4DIBcqN013433 for ; Wed, 13 May 2009 19:11:39 +0100 Received: from qw-out-2122.google.com (qwd5.prod.google.com [10.241.193.197]) by zps38.corp.google.com with ESMTP id n4DIBadU028542 for ; Wed, 13 May 2009 11:11:37 -0700 Received: by qw-out-2122.google.com with SMTP id 5so622762qwd.37 for ; Wed, 13 May 2009 11:11:36 -0700 (PDT) MIME-Version: 1.0 Received: by 10.229.81.136 with SMTP id x8mr1073686qck.49.1242238296727; Wed, 13 May 2009 11:11:36 -0700 (PDT) In-Reply-To: <20090513092709.GB7292@adacore.com> References: <8ac60eac0905051749p3b5d14d9q8903b9de8e18137f@mail.gmail.com> <20090512082530.GD7584@adacore.com> <8ac60eac0905121353i4aae7110sebb34bec1de0d6d8@mail.gmail.com> <20090513092709.GB7292@adacore.com> Date: Wed, 13 May 2009 18:11:00 -0000 Message-ID: <8ac60eac0905131111v7a73a628o5e6dfee5969119d3@mail.gmail.com> Subject: Re: [patch] Eliminate quadratic slow-down on number of solibs (part 2). From: Paul Pluzhnikov To: Joel Brobecker Cc: gdb-patches@sourceware.org, Tom Tromey Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-System-Of-Record: true 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: 2009-05/txt/msg00279.txt.bz2 On Wed, May 13, 2009 at 2:27 AM, Joel Brobecker wrote: >> Because of that, your "maintenance set ..." suggestion doesn't >> make sense to me: why would you ever want O(N*N) algorithm when an >> O(N) one is available? > > There was a communication issue somewhere. I didn't suggest that > we should keep the O(N*N) algorithm. The command was on top of already > having the O(N) approach... Ah, sorry I misunderstood you. To summarize, there are 4 separate changes flying around: 1. The "don't rescan all objfiles over and over looking for ObjC methods" patch here: http://sourceware.org/ml/gdb-patches/2009-05/msg00253.html I just committed that. 2. The "don't rescan all objfiles over and over looking for _ovly_debug_event" patch here: http://sourceware.org/ml/gdb-patches/2009-05/msg00255.html This patch is "ready to commit"; not sure if I need any further approvals for it. 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 :-( 4. Joel's proposal (if I understood it correctly) to extend patch#3 above to add external control of the suppress_breakpoint_reset variable via "maintenance set/show breakpoint-reset" or some such. This would allow advanced users to turn off breakpoint reset even in cases not addressed by patch#3, but they should really know what they are doing. Once could easily imagine such a scenario: a program that dlopen()s 1000s of solibs in sequence. You'd then turn off breakpoint reset for all but the very last solib. But I can't imagine a real program actually doing this. Thanks, -- Paul Pluzhnikov