From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by sourceware.org (Postfix) with ESMTPS id 7EF5D38618F1 for ; Wed, 17 Mar 2021 10:46:52 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 7EF5D38618F1 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=tdevries@suse.de X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id A256BAC23; Wed, 17 Mar 2021 10:46:51 +0000 (UTC) Subject: Re: [PATCH] Add --devel-skip-producer To: Mark Wielaard Cc: dwz@sourceware.org, jakub@redhat.com References: <20210316141919.GA24635@delia> <20210316212749.GC3054@wildebeest.org> From: Tom de Vries Message-ID: <0956da43-2f83-83a8-1da2-63916d4b49f6@suse.de> Date: Wed, 17 Mar 2021 11:46:51 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.0 MIME-Version: 1.0 In-Reply-To: <20210316212749.GC3054@wildebeest.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.2 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, NICE_REPLY_A, 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: dwz@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Dwz mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Mar 2021 10:46:53 -0000 On 3/16/21 10:27 PM, Mark Wielaard wrote: > Hi Tom, > > On Tue, Mar 16, 2021 at 03:19:20PM +0100, Tom de Vries wrote: >> In PR27588 a test-case was reported where dwz did not optimize due >> to illegal DWARF produced by nasm: >> ... >> $ dwz libxul.so -o libxul.so.z >> dwz: libxul.so: loclistptr attribute, yet no .debug_loc section >> ... >> >> Add an option --devel-skip-producer such that we can filter out >> CUs coming from a particular producer, such that we have instead: >> ... >> $ readelf -wi libxul.so | grep DW_AT_producer \ >> | sed 's/.*: //' | sort | uniq -c >> 176 clang LLVM (rustc version 1.50.0) >> 2 GNU AS 2.36.1 >> 2 GNU C11 11.0.1 20210315 (experimental) >> 16 NASM 2.15.05 >> 76 yasm 1.3.0 >> $ dwz libxul.so -o libxul.so.z --devel-skip-producer NASM >> $ readelf -wi libxul.so.z | grep DW_AT_producer \ >> | sed 's/.*: //' | sort | uniq -c >> 176 clang LLVM (rustc version 1.50.0) >> 2 GNU AS 2.36.1 >> 2 GNU C11 11.0.1 20210315 (experimental) >> 76 yasm 1.3.0 >> ... >> >> Any comments? > > So this skips and then removes the whole CU (because we set die_remove > on the cu_die)? > Yes. > It is useful as --devel option, but I would be against it as non-devel > option. Could you explain in more detail why you would be against this as a non-devel option? F.i., I'm curious, is it an abstract objection, or do you foresee concrete problems with the approach? Thanks, - Tom