From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 112088 invoked by alias); 19 Feb 2020 04:20:33 -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 112074 invoked by uid 89); 19 Feb 2020 04:20:33 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-5.2 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.1 spammy= X-HELO: simark.ca Received: from simark.ca (HELO simark.ca) (158.69.221.121) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 19 Feb 2020 04:20:32 +0000 Received: from [10.0.0.11] (unknown [192.222.164.54]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id 842301E47D; Tue, 18 Feb 2020 23:20:30 -0500 (EST) Subject: Re: [PATCH 05/14] Introduce dwarf2_unshareable and move die_type_hash To: Tom Tromey , gdb-patches@sourceware.org References: <20200215165444.32653-1-tom@tromey.com> <20200215165444.32653-6-tom@tromey.com> From: Simon Marchi Message-ID: Date: Wed, 19 Feb 2020 04:20:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.2 MIME-Version: 1.0 In-Reply-To: <20200215165444.32653-6-tom@tromey.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2020-02/txt/msg00759.txt.bz2 On 2020-02-15 11:54 a.m., Tom Tromey wrote: > The goal of this series is to share dwarf2_per_objfile across > objfiles. However, this is difficult to do, because it has some > members that are inherently per-objfile. > > This patch introduces a new "unshareable" object. The idea here is > that we'll have one such object per objfile, and we'll temporarily > update the pointer when needed. This is a bit ugly, but it's > convenient, because it doesn't require a huge rewriting of the DWARF > code. (I would be in favor of such a rewriting, but ... it's huge.) > > This patch further moves one such member, the DIE type hash, to the > new structure. > > In this patch, the new object is managed by the dwarf2_per_objfile. > However, by the end of the series, this will change. So, in the end we'll have dwarf2_per_objfile, of which there will be only one and will be shared between the objfiles, and dwarf2_unshareable of which there will be N (for N objfiles), which won't be shared between the objfiles? I find it a bit confusing, because now the object called "per_objfile" is not per objfile. Simon