From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 51672 invoked by alias); 17 Feb 2020 12:31:26 -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 51655 invoked by uid 89); 17 Feb 2020 12:31:25 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-9.8 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.1 spammy=Implementing X-HELO: mail-qk1-f193.google.com Received: from mail-qk1-f193.google.com (HELO mail-qk1-f193.google.com) (209.85.222.193) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 17 Feb 2020 12:31:24 +0000 Received: by mail-qk1-f193.google.com with SMTP id o28so14638834qkj.9 for ; Mon, 17 Feb 2020 04:31:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=G2tAJE+ogx79DubJwHmZQs4XtQYimAD63ZP7HY0gY8g=; b=MOxopwZKR1g8VDqPM6Q2628TbOAjzDQGr3x6l1hbQyQGleps6sZ6tR6pAalwMnWOAn 7jSp6dr/YtAkybZzvTt5NqC6dEMaHNJ2ynnfv4vkdklZKv3XVsyANNQoOV98cCdXbmjK pYQ0mbbAl/5Ub6JyNfqDMbT757yzalkmglTpAIrYChW/8m/bd+YpVWjLpVNE80MArEbk TL5p7hb0GKtUErW7/MGLqpUYwCBEISBAwDiZBjwsfkn3Yt740jOlQKO7Xu0wr3ew+itB 8bstbgIBRSMtKq4eaAtdj5IHJKyEYQu1NDYRmG+ceWG8wSdm1E3lcD0wgGKMIZbI1XK2 3Eog== Return-Path: Received: from [192.168.0.185] ([191.34.156.101]) by smtp.gmail.com with ESMTPSA id r5sm100722qtn.25.2020.02.17.04.31.19 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 17 Feb 2020 04:31:21 -0800 (PST) Subject: Re: [PATCH 00/14] Share DWARF partial symtabs between objfiles To: Tom Tromey , gdb-patches@sourceware.org References: <20200215165444.32653-1-tom@tromey.com> From: Luis Machado Message-ID: <3b7ccfdc-0c9b-4322-d087-1cffa8bf7c4d@linaro.org> Date: Mon, 17 Feb 2020 12:31:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 In-Reply-To: <20200215165444.32653-1-tom@tromey.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2020-02/txt/msg00614.txt.bz2 On 2/15/20 1:54 PM, Tom Tromey wrote: > A long-term goal for multi-inferior debugging has been to "split" an > objfile, so that the bulk of the data can be shared across inferiors. > Although a lot of progress has been made on this front, it has turned > out to be surprisingly difficult to fully implement. > > "Recently" (a year or two ago) I realized that we could get most of > the benefits of this split by sharing partial symbol tables. This is > true because reading partial symbols is the slowest operation that > users see -- in most cases, expanding a full symtab is reasonably > quick. > > Implementing this also turned out to be tricky; but unlike the > situation with types and symbols, it was possible to do incrementally. > > This series implements this idea for DWARF. It separates > dwarf2_per_objfile into shareable and unshareable parts; then, when > possible, the object is attached to the BFD. > > You can see the difference when timing "add-inferior -exec ./gdb", > after "gdb ./gdb": > Out of curiosity, what use cases would this cover? I imagine symbol data could be shared, with a few exceptions, only with binaries that are equal to the one we've already loaded/we're already debugging. Is this a common scenario? Would type-sharing also be a common scenario?