From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22972 invoked by alias); 3 Jun 2013 06:01:43 -0000 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 Received: (qmail 22941 invoked by uid 89); 3 Jun 2013 06:01:37 -0000 X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_HOSTKARMA_NO autolearn=ham version=3.3.1 Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Mon, 03 Jun 2013 06:01:36 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id EE8E62EBD0; Mon, 3 Jun 2013 02:01:34 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id zJVgCnECjU8W; Mon, 3 Jun 2013 02:01:34 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 5F3242E476; Mon, 3 Jun 2013 02:01:34 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id C1792C255A; Mon, 3 Jun 2013 10:01:28 +0400 (RET) Date: Mon, 03 Jun 2013 06:01:00 -0000 From: Joel Brobecker To: Doug Evans Cc: Pedro Alves , Keith Seitz , psmith@gnu.org, gdb-patches@sourceware.org Subject: Re: [patch] Improve symbol lookup performance noted in PR 15519 Message-ID: <20130603060128.GB12363@adacore.com> References: <20903.57436.871210.593441@ruffy.mtv.corp.google.com> <51A86FF5.9090401@redhat.com> <20905.9501.800725.439795@ruffy.mtv.corp.google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20905.9501.800725.439795@ruffy.mtv.corp.google.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-SW-Source: 2013-06/txt/msg00003.txt.bz2 > So the speedup comes from calling a more specific lookup routine for > the task at hand. > > Also note that even in the "after" case we are still doing a lot of > duplicate lookups. cp-namespace.c is a bit clumsy in some of the > lookups it does. Although it's hampered by having to work with the > data structures gdb provides it. My plan is to work on both this > summer. This is a bit of a digression, but this reminds me that we have similar types of issues with Ada (multiple identical lookups), and it's not easy to prevent them. The way we've dealt with the issue is to implement a cache, and it yielded good results. I have been meaning to contribute that code, but it needs to be cleaned up, because the cache invalidation is performed manually by sprinkling calls to ada-lang here and there, wherever necessary. This should be done using observers instead, adding new ones if necessary. Perhaps the same could benefit C++ as well, and one could even imagine a common cache or at least caching infrastructure. -- Joel