From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp002.apm-internet.net (smtp002.apm-internet.net [85.119.248.221]) by sourceware.org (Postfix) with ESMTPS id C25F73858C53 for ; Fri, 2 Jun 2023 08:32:41 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C25F73858C53 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=sandoe.co.uk Authentication-Results: sourceware.org; spf=none smtp.mailfrom=sandoe.co.uk Received: (qmail 8085 invoked from network); 2 Jun 2023 08:32:40 -0000 X-APM-Out-ID: 16856947600808 X-APM-Authkey: 257869/1(257869/1) 2 Received: from unknown (HELO smtpclient.apple) (81.138.1.83) by smtp002.apm-internet.net with SMTP; 2 Jun 2023 08:32:40 -0000 Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.3\)) Subject: Re: [PATCH 2/2] btf: improve -dA comments for testsuite From: Iain Sandoe In-Reply-To: <16c13d09-eff0-8722-52c1-fe2eec165f11@oracle.com> Date: Fri, 2 Jun 2023 09:32:39 +0100 Cc: GCC Patches Content-Transfer-Encoding: quoted-printable Message-Id: <930CE61F-7427-46EE-A7C7-F13D0C584E9B@sandoe.co.uk> References: <20230525163740.6062-1-david.faust@oracle.com> <20230530182702.8020-1-david.faust@oracle.com> <20230530182702.8020-2-david.faust@oracle.com> <16c13d09-eff0-8722-52c1-fe2eec165f11@oracle.com> To: David Faust X-Mailer: Apple Mail (2.3696.120.41.1.3) X-Spam-Status: No, score=-8.0 required=5.0 tests=BAYES_00,KAM_COUK,KAM_DMARC_STATUS,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Hi David, > On 31 May 2023, at 07:13, Indu Bhagat via Gcc-patches = wrote: >=20 > On 5/30/23 11:27, David Faust wrote: >> [Changes from v1: >> - Fix typos. >> - Split unrelated change into separate commit. >> - Improve asm comment for enum constants, update btf-enum-1 test. >> - Improve asm comment for DATASEC records, update btf-datasec-2 = test.] >> Many BTF type kinds refer to other types via index to the final types >> list. However, the order of the final types list is not guaranteed to >> remain the same for the same source program between different runs of >> the compiler, making it difficult to test inter-type references. >> This patch updates the assembler comments output when writing a >> given BTF record to include minimal information about the referenced >> type, if any. This allows for the regular expressions used in the gcc >> testsuite to do some basic integrity checks on inter-type references. >> For example, for the type >> unsigned int * >> Assembly comments like the following are written with -dA: >> .4byte 0 ; TYPE 2 BTF_KIND_PTR '' >> .4byte 0x2000000 ; btt_info: kind=3D2, kflag=3D0, vlen=3D0 >> .4byte 0x1 ; btt_type: (BTF_KIND_INT 'unsigned int') >> Several BTF tests which can immediately be made more robust with this >> change are updated. It will also be useful in new tests for the = upcoming >> btf_type_tag support. >> Re-tested on BPF and x86_64, no known regressions. >> Thanks. >=20 > LGTM. This seems to break bootstrap on x86_64 darwin with two instances of : gcc/btfout.cc:802:32: error: format =E2=80=98%lu=E2=80=99 expects = argument of type =E2=80=98long unsigned int=E2=80=99, but argument 4 has = type =E2=80=98ctf_id_t=E2=80=99 {aka =E2=80=98long long unsigned int=E2=80= =99} [-Werror=3Dformat=3D] 802 | "TYPE %lu BTF_KIND_%s '%s=E2=80=99" And another on line 970. could you suggest where the change should be? thanks Iain