public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Alex Coplan <alex.coplan@arm.com>
To: Iain Sandoe <iain@sandoe.co.uk>
Cc: David Faust <david.faust@oracle.com>,
	GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH 2/2] btf: improve -dA comments for testsuite
Date: Fri, 2 Jun 2023 17:07:42 +0100	[thread overview]
Message-ID: <ZHoTztICUmD8Iosi@arm.com> (raw)
In-Reply-To: <930CE61F-7427-46EE-A7C7-F13D0C584E9B@sandoe.co.uk>

Hi Iain,

On 02/06/2023 09:32, Iain Sandoe wrote:
> Hi David,
> 
> > On 31 May 2023, at 07:13, Indu Bhagat via Gcc-patches <gcc-patches@gcc.gnu.org> wrote:
> > 
> > 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=2, kflag=0, vlen=0
> >> 	.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.
> > 
> > LGTM.
> 
> This seems to break bootstrap on x86_64 darwin with two instances of :
> 
> gcc/btfout.cc:802:32: error: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 4 has type ‘ctf_id_t’ {aka ‘long long unsigned int’} [-Werror=format=]
> 802 |                        "TYPE %lu BTF_KIND_%s '%s’"
> 
> And another on line 970.
> 
> could you suggest where the change should be?

I've pushed a fix for this:
https://gcc.gnu.org/pipermail/gcc-patches/2023-June/620515.html
as g:f2e60a00c7c017bd87ba9afb189cbb77d8c92925.

Thanks,
Alex

> thanks
> Iain
> 

  reply	other threads:[~2023-06-02 16:07 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-25 16:37 [PATCH] " David Faust
2023-05-30  7:30 ` Indu Bhagat
2023-05-30 16:08   ` David Faust
2023-05-30 16:45     ` Indu Bhagat
2023-05-30 18:27 ` [PATCH 1/2] btf: be clear when record size/type is not used David Faust
2023-05-30 18:27   ` [PATCH 2/2] btf: improve -dA comments for testsuite David Faust
2023-05-31  6:13     ` Indu Bhagat
2023-06-02  8:32       ` Iain Sandoe
2023-06-02 16:07         ` Alex Coplan [this message]
2023-05-31  6:12   ` [PATCH 1/2] btf: be clear when record size/type is not used Indu Bhagat

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZHoTztICUmD8Iosi@arm.com \
    --to=alex.coplan@arm.com \
    --cc=david.faust@oracle.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=iain@sandoe.co.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).