From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30365 invoked by alias); 21 Feb 2007 01:11:54 -0000 Received: (qmail 30352 invoked by uid 22791); 21 Feb 2007 01:11:53 -0000 X-Spam-Check-By: sourceware.org Received: from mx2.palmsource.com (HELO mx2.palmsource.com) (12.7.175.14) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 21 Feb 2007 01:11:49 +0000 Received: from localhost (localhost [127.0.0.1]) by localhost.domain.tld (Postfix) with ESMTP id EC1A01149AD; Tue, 20 Feb 2007 17:11:47 -0800 (PST) Received: from mx2.palmsource.com ([127.0.0.1]) by localhost (mx2.palmsource.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 03963-02-13; Tue, 20 Feb 2007 17:11:46 -0800 (PST) Received: from ussunex01.palmsource.com (unknown [192.168.101.9]) by mx2.palmsource.com (Postfix) with ESMTP id E51AD114915; Tue, 20 Feb 2007 17:11:46 -0800 (PST) Received: from 192.168.92.92 ([192.168.92.92]) by ussunex01.palmsource.com ([192.168.101.9]) via Exchange Front-End Server owa.palmsource.com ([10.0.20.17]) with Microsoft Exchange Server HTTP-DAV ; Wed, 21 Feb 2007 01:11:46 +0000 Received: from svmsnyderlnx by owa.palmsource.com; 20 Feb 2007 17:11:45 -0800 Subject: Re: Organization of breakpoint locations From: Michael Snyder To: Daniel Jacobowitz Cc: Thomas Neumann , gdb@sourceware.org In-Reply-To: <20070219115744.GC6815@caradoc.them.org> References: <45D97E30.2060008@users.sourceforge.net> <20070219115744.GC6815@caradoc.them.org> Content-Type: text/plain Content-Transfer-Encoding: 7bit Date: Wed, 21 Feb 2007 17:05:00 -0000 Message-Id: <1172020305.19657.83.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.4.1 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: 2007-02/txt/msg00221.txt.bz2 On Mon, 2007-02-19 at 06:57 -0500, Daniel Jacobowitz wrote: > On Mon, Feb 19, 2007 at 11:38:40AM +0100, Thomas Neumann wrote: > > Hi, > > > > I would like some suggestions on the organization of breakpoint > > locations in breakpoint.c. Currently, all breakpoint locations are > > stored in a linear list. This does not scale if the number of > > breakpoints is large, see PR 2230 for an example. Instead the > > breakpoints should be stored in a suitable search structure (e.g. a > > balanced tree). > > > > I have a patch that converts the list into a splay. Works fine, and the > > bottleneck indeed goes away, but I am not satisfied with the approach > > itself. > > Have you tested this in any real world use yet? This is only the > first limitation you'll encounter, I think. For instance, every time > you step and then stop the program, GDB is going to remove every > breakpoint. That's going to be just as slow. Maybe not. If they're grouped by address, and if there are a lot of duplicates, gdb could set/clear the breakpoint at that address once, and then mark them all inserted or not.