From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30850 invoked by alias); 22 Jun 2009 19:30:02 -0000 Received: (qmail 30752 invoked by uid 22791); 22 Jun 2009 19:30:01 -0000 X-SWARE-Spam-Status: No, hits=-1.4 required=5.0 tests=AWL,BAYES_00,MSGID_FROM_MTA_HEADER,SPF_SOFTFAIL X-Spam-Check-By: sourceware.org Received: from mtagate6.de.ibm.com (HELO mtagate6.de.ibm.com) (195.212.29.155) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 22 Jun 2009 19:29:56 +0000 Received: from d12nrmr1607.megacenter.de.ibm.com (d12nrmr1607.megacenter.de.ibm.com [9.149.167.49]) by mtagate6.de.ibm.com (8.14.3/8.13.8) with ESMTP id n5MJSkRw653964 for ; Mon, 22 Jun 2009 19:28:46 GMT Received: from d12av02.megacenter.de.ibm.com (d12av02.megacenter.de.ibm.com [9.149.165.228]) by d12nrmr1607.megacenter.de.ibm.com (8.13.8/8.13.8/NCO v9.2) with ESMTP id n5MJSkHF3412040 for ; Mon, 22 Jun 2009 21:28:46 +0200 Received: from d12av02.megacenter.de.ibm.com (loopback [127.0.0.1]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id n5MJSjNk013958 for ; Mon, 22 Jun 2009 21:28:46 +0200 Received: from tuxmaker.boeblingen.de.ibm.com (tuxmaker.boeblingen.de.ibm.com [9.152.85.9]) by d12av02.megacenter.de.ibm.com (8.12.11.20060308/8.12.11) with SMTP id n5MJSivT013948; Mon, 22 Jun 2009 21:28:44 +0200 Message-Id: <200906221928.n5MJSivT013948@d12av02.megacenter.de.ibm.com> Received: by tuxmaker.boeblingen.de.ibm.com (sSMTP sendmail emulation); Mon, 22 Jun 2009 21:28:44 +0200 Subject: Re: [rfc][patch] Eliminate quadratic slow-down on number of solibs. To: ppluzhnikov@google.com (Paul Pluzhnikov) Date: Mon, 22 Jun 2009 19:30:00 -0000 From: "Ulrich Weigand" Cc: brobecker@adacore.com (Joel Brobecker), tromey@redhat.com, gdb-patches@sourceware.org In-Reply-To: <8ac60eac0906221156o91c8059t17d1dd1bd2752dd0@mail.gmail.com> from "Paul Pluzhnikov" at Jun 22, 2009 11:56:28 AM MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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-06/txt/msg00577.txt.bz2 Paul Pluzhnikov wrote: > > If you're going to reset only breakpoints > > from one objfile, maybe you should likewise *delete* only breakpoints > > from that objfile? > > That sounds like a good approach :-) > > Patch below tested on Linux/x86_64 with no new failures. Thanks for the quick reply! > Unfortunately I don't have any targets that support overlays, so I can't > test this. Did this fail for you on spu? If so, does it pass with this patch? Unfortunately, I don't have a ready test case, I noticed the problem while reading the code ... Mainline GDB does not yet support combined Cell/B.E. debugging, and stand-alone SPU executables are always statically linked so I'm never seeing more than one objfile anyway. In any case, I don't think your patch fixes the problem in the case where more than one objfile defines _ovly_debug_event: > + case bp_overlay_event: > + if (objfile == NULL > + || lookup_minimal_symbol_text (b->addr_string, objfile)) > + { > + /* Delete overlay event breakpoints; they will be reset later by > + breakpoint_re_set. */ > + delete_breakpoint (b); > + } > + break; If objfile actually defines _ovly_debug_event, the symbol lookup will succeed for *all* bp_overlay_event breakpoints, as they all use the same addr_string, and thus all breakpoints will be deleted. But again, only one of them will get re-inserted ... I guess you'd have to verify that not only symbol lookup succeeded, but it results in the address used to set this breakpoint. But that's not really correct either, because breakpoint_re_set may get called after an objfile has been relocated. In fact, I don't really see an easy way to identify the originating objfile just from looking at the breakpoint. Maybe we could set addr_string to some string that uniquely identifies the objfile when creating the breakpoint? It isn't really used for a lot else for bp_overlay_event breakpoints (except for the maint info breakpoint output). Bye, Ulrich -- Dr. Ulrich Weigand GNU Toolchain for Linux on System z and Cell BE Ulrich.Weigand@de.ibm.com