From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19016 invoked by alias); 22 Jun 2009 17:10:24 -0000 Received: (qmail 19001 invoked by uid 22791); 22 Jun 2009 17:10:21 -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 mtagate7.de.ibm.com (HELO mtagate7.de.ibm.com) (195.212.29.156) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 22 Jun 2009 17:10:14 +0000 Received: from d12nrmr1607.megacenter.de.ibm.com (d12nrmr1607.megacenter.de.ibm.com [9.149.167.49]) by mtagate7.de.ibm.com (8.14.3/8.13.8) with ESMTP id n5MHA0ZP697554 for ; Mon, 22 Jun 2009 17:10:00 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 n5MHA1oJ3198984 for ; Mon, 22 Jun 2009 19:10:01 +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 n5MHA0Ew029482 for ; Mon, 22 Jun 2009 19:10:01 +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 n5MH9xPY029467; Mon, 22 Jun 2009 19:09:59 +0200 Message-Id: <200906221709.n5MH9xPY029467@d12av02.megacenter.de.ibm.com> Received: by tuxmaker.boeblingen.de.ibm.com (sSMTP sendmail emulation); Mon, 22 Jun 2009 19:09:59 +0200 Subject: Re: [rfc][patch] Eliminate quadratic slow-down on number of solibs. To: ppluzhnikov@google.com (Paul Pluzhnikov) Date: Mon, 22 Jun 2009 17:10:00 -0000 From: "Ulrich Weigand" Cc: brobecker@adacore.com (Joel Brobecker), tromey@redhat.com, gdb-patches@sourceware.org In-Reply-To: <8ac60eac0905121420t3954685v4b5328d05e072f92@mail.gmail.com> from "Paul Pluzhnikov" at May 12, 2009 02:20:49 PM 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/msg00566.txt.bz2 Paul Pluzhnikov wrote: > 2009-05-12 Paul Pluzhnikov > > * breakpoint.h: Add breakpoint_re_set_objfile prototype. > > * breakpoint.c (create_overlay_event_breakpoint): Renamed > from create_overlay_event_breakpoint_1, old > create_overlay_event_breakpoint deleted. > (breakpoint_re_set_objfile): Don't rescan all objfiles > unnecessarily. > (breakpoint_re_set): New function. > > * symfile.c (new_symfile_objfile): Call breakpoint_re_set_objfile > instead of breakpoint_re_set. > > * objfiles.c (objfile_relocate): Likewise. Maybe I'm missing something here, but this seems to break overlay support. Assume that _ovly_debug_event is defined in objfile A, and breakpoint_re_set_objfile is called for objfile B. The logic in breakpoint_re_set_one will unconditionally delete all instances of bp_overlay_event breakpoints, including the one in objfile A, because it assumes they will be reset later. However, after your change only objfile B is scanned for that symbol; as it is not found there, the overlay event breakpoint will simply not be reset. I guess the situation for Cell/B.E. applications with multiple SPU contexts would be even worse. In this case, we have multiple objfiles each defining its own instance of _ovly_debug_event, and for proper operation of overlay debugging each of those instances need to carry a breakpoint. Before your patch, breakpoint_re_set would first delete all instances of the overlay event breakpoint, and subsequently reset them all. After your patch, breakpoint_re_set_objfile will *still* delete *all* instances, but will subsequently reset at most one of them ... How is this supposed to work? If you're going to reset only breakpoints from one objfile, maybe you should likewise *delete* only breakpoints from that objfile? Bye, Ulrich -- Dr. Ulrich Weigand GNU Toolchain for Linux on System z and Cell BE Ulrich.Weigand@de.ibm.com