From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29018 invoked by alias); 23 Jun 2009 13:32:24 -0000 Received: (qmail 29005 invoked by uid 22791); 23 Jun 2009 13:32:23 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL,BAYES_00,MSGID_FROM_MTA_HEADER,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mtagate2.de.ibm.com (HELO mtagate2.de.ibm.com) (195.212.17.162) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 23 Jun 2009 13:32:17 +0000 Received: from d12nrmr1607.megacenter.de.ibm.com (d12nrmr1607.megacenter.de.ibm.com [9.149.167.49]) by mtagate2.de.ibm.com (8.13.1/8.13.1) with ESMTP id n5NDWDYg026556 for ; Tue, 23 Jun 2009 13:32:13 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 n5NDWDmv2703534 for ; Tue, 23 Jun 2009 15:32:13 +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 n5NDWCdC003572 for ; Tue, 23 Jun 2009 15:32:13 +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 n5NDWBD6003501; Tue, 23 Jun 2009 15:32:11 +0200 Message-Id: <200906231332.n5NDWBD6003501@d12av02.megacenter.de.ibm.com> Received: by tuxmaker.boeblingen.de.ibm.com (sSMTP sendmail emulation); Tue, 23 Jun 2009 15:32:11 +0200 Subject: Re: [rfc][patch] Eliminate quadratic slow-down on number of solibs. To: ppluzhnikov@google.com (Paul Pluzhnikov) Date: Tue, 23 Jun 2009 13:32:00 -0000 From: "Ulrich Weigand" Cc: brobecker@adacore.com (Joel Brobecker), tromey@redhat.com, gdb-patches@sourceware.org In-Reply-To: <8ac60eac0906221832k142f048dwf0179c934cc6bca3@mail.gmail.com> from "Paul Pluzhnikov" at Jun 22, 2009 06:32:59 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/msg00603.txt.bz2 Paul Pluzhnikov wrote: > >> I also verified that create_overlay_event_breakpoint is not called for > >> each solib (though it is called 7 times, which seems like 6 too many). > > > > Hmm, do you understand where the other calls come from? > > I've attached a log (to avoid GMail line wrapping): 4 calls at startup, > 3 more when all the solibs are loaded. I haven't debugged the exact reason; > in my reading of the code it should only fire once after all solibs. So from these backtraces it looks like the calls on startup are: - one call after the main executable is loaded - one call in solib_add after all the directly linked shared libraries are loaded - one extra call in post_create_inferior: /* If the user sets watchpoints before execution having started, then she gets software watchpoints, because GDB can't know which target will end up being pushed, or if it supports hardware watchpoints or not. breakpoint_re_set takes care of promoting watchpoints to hardware watchpoints if possible, however, if this new inferior doesn't load shared libraries or we don't pull in symbols from any other source on this target/arch, breakpoint_re_set is never called. Call it now so that software watchpoints get a chance to be promoted to hardware watchpoints if the now pushed target supports hardware watchpoints. */ - and finally one more call after the "magic" vsyscall solib is installed (from add_vsyscall_page) I guess some of those could get removed by some more restructuring of the code, but I'm not sure this is worth the effort. The three subsequent calls all come from solib_add, presumably as more shared libraries are loaded via dlopen? If so, there's again probably not a lot we can do about that. > 2009-06-22 Paul Pluzhnikov > > Revert 2009-05-14 breakpoint commit (no longer needed). > * breakpoint.h (breakpoint_re_set_objfile): Remove > * breakpoint.c (breakpoint_re_set_objfile): Likewise > (create_overlay_event_breakpoint): Remove objfile parameter, > iterate over all objfiles. > * objfiles.c (objfile_relocate): Update. > * symfile.c (new_symfile_objfile): Likewise. This is OK. Thanks, Ulrich -- Dr. Ulrich Weigand GNU Toolchain for Linux on System z and Cell BE Ulrich.Weigand@de.ibm.com