From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net [217.70.183.193]) by sourceware.org (Postfix) with ESMTPS id DB42E384403B for ; Thu, 9 Jul 2020 12:58:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org DB42E384403B Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=seketeli.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=dodji@seketeli.org X-Originating-IP: 91.166.131.130 Received: from localhost (91-166-131-130.subs.proxad.net [91.166.131.130]) (Authenticated sender: dodji@seketeli.org) by relay1-d.mail.gandi.net (Postfix) with ESMTPSA id 1CC10240012; Thu, 9 Jul 2020 12:58:13 +0000 (UTC) Received: by localhost (Postfix, from userid 1000) id 8BC5E1800867; Thu, 9 Jul 2020 14:58:12 +0200 (CEST) From: Dodji Seketeli To: Giuliano Procida Cc: libabigail@sourceware.org, kernel-team@android.com, maennich@google.com Subject: Re: [PATCH v2] abg-reader.cc: track WIP types by pointer not name Organization: Me, myself and I References: <20200622160619.4154-1-gprocida@google.com> <20200622172504.27660-1-gprocida@google.com> X-Operating-System: Red Hat Enterprise Linux Workstation 7.8 Beta X-URL: http://www.seketeli.net/~dodji Date: Thu, 09 Jul 2020 14:58:12 +0200 In-Reply-To: <20200622172504.27660-1-gprocida@google.com> (Giuliano Procida's message of "Mon, 22 Jun 2020 18:25:04 +0100") Message-ID: <87fta0rgkb.fsf@seketeli.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-3.6 required=5.0 tests=BAYES_00, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libabigail@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Mailing list of the Libabigail project List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jul 2020 12:58:17 -0000 Hello, Giuliano Procida a =C3=A9crit: > When reading ABI XML files, the reader needs to construct types > progressively as any type may depend on other types and even on > itself. Such work-in-progress types are tracked explicitly. Right. Though I looked at this in details and I think this whole WIP tracking is useless now, in the abixml reader so we might as well get rid of it altogether. It was used back in the old days because there was no type de-duplication in abixml so the volume of types seen by the abixml reader could be really huge some times. So delaying type canonicalization had a big impact, potentially. So canonicalizing for a WIP struct or function type was delayed until all the abixml file is read. Now in the code, all structs and function types are delayed anyway, irrespective of their WIP-ness. And we received no complaints of slowness from the abixml reader. So really, I am going to just dump the support for tracking WIP types in the abixml reader altogether. I am nervous about doing the same from the DWARF reader, though, as we can see *many* more types from DWARF because of all the duplication inherent to how the DWARF is generated at the moment. So I think this patch, altough valid, won't be necessary as the WIP types tracking is going away. > > The storage used for this is a map from (external, qualified) type > name to a count of how many times the type (name) has been seen. > > However, function type names are invariably stored as "void ()" as > they are incomplete at the point they are added to the map. When the > reader later attempts to remove the marking they have their proper, > different names. In short, the code doesn't do what it's supposed to. > Right, I agree. This WIP thing wasdesigned before the support for function types was added. And yes, the string representation of a function types changes during its WIP life-cycle so clearly using that representation to designate it is problematic. So really, let's just dump the support for WIP type tracking from the abixml reader. I'll send a patch for that right away. Thanks! [...] Cheers, --=20 Dodji