From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26255 invoked by alias); 3 Jun 2009 21:36:25 -0000 Received: (qmail 26247 invoked by uid 22791); 3 Jun 2009 21:36:24 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx2.redhat.com (HELO mx2.redhat.com) (66.187.237.31) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 03 Jun 2009 21:36:18 +0000 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n53LYDZf012917; Wed, 3 Jun 2009 17:34:13 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n53LYBai005789; Wed, 3 Jun 2009 17:34:12 -0400 Received: from opsy.redhat.com (vpn-13-177.rdu.redhat.com [10.11.13.177]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n53LYA1Z028201; Wed, 3 Jun 2009 17:34:11 -0400 Received: by opsy.redhat.com (Postfix, from userid 500) id D06B03784E9; Wed, 3 Jun 2009 15:34:09 -0600 (MDT) To: Paul Pluzhnikov Cc: gdb-patches@sourceware.org Subject: Re: [patch] Eliminate quadratic slow-down on number of solibs (part 2). References: <8ac60eac0905051749p3b5d14d9q8903b9de8e18137f@mail.gmail.com> <8ac60eac0906031245v4db0ae38ubeee91d49611851f@mail.gmail.com> From: Tom Tromey Reply-To: Tom Tromey Date: Wed, 03 Jun 2009 21:36:00 -0000 In-Reply-To: <8ac60eac0906031245v4db0ae38ubeee91d49611851f@mail.gmail.com> (Paul Pluzhnikov's message of "Wed\, 3 Jun 2009 12\:45\:42 -0700") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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/msg00051.txt.bz2 >>>>> "Paul" == Paul Pluzhnikov writes: Paul> The problem is that the call chain is deep: Yeah, but it can be simplified. Paul> #3 0x00000000004e3ee5 in symbol_file_add_from_bfd (abfd=0xd57fe0, Paul> from_tty=0, addrs=0x0, mainline=0, flags=) Paul> at ../../src/gdb/symfile.c:1103 Paul> #4 0x00000000004e3812 in symbol_file_add_with_addrs_or_offsets ( Paul> abfd=, from_tty=0, addrs=0xa62410, Paul> offsets=0x0, num_offsets=0, mainline=0, Paul> flags=) at ../../src/gdb/symfile.c:1033 Paul> #5 0x00000000004e3ee5 in symbol_file_add_from_bfd (abfd=0xd57fe0, Paul> from_tty=0, addrs=0x0, mainline=0, flags=) Paul> at ../../src/gdb/symfile.c:1103 These are all just forwarding calls, basically overloads. You could add a new overload just for this purpose. Paul> #6 0x0000000000462070 in symbol_add_stub (arg=) Paul> at ../../src/gdb/solib.c:470 Paul> #7 0x00000000004fdf8b in catch_errors ( Paul> func=0x461ff0 , func_args=0xae7a10, Paul> errstring=0x658e68 "Error while reading shared library Paul> symbols:\n", mask=) at Paul> ../../src/gdb/exceptions.c:510 These could be turned into a TRY_CATCH inside solib_read_symbols. symbol_add_stub is only called from a single place. Tom