public inbox for llvm@lists.linux.dev
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Sedat Dilek <sedat.dilek@gmail.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>,
	Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Andrii Nakryiko <andrii@kernel.org>,
	Martin KaFai Lau <martin.lau@linux.dev>,
	Song Liu <song@kernel.org>, Yonghong Song <yhs@fb.com>,
	John Fastabend <john.fastabend@gmail.com>,
	KP Singh <kpsingh@kernel.org>,
	Stanislav Fomichev <sdf@google.com>, Hao Luo <haoluo@google.com>,
	Jiri Olsa <jolsa@kernel.org>,
	bpf@vger.kernel.org, Nathan Chancellor <natechancellor@gmail.com>,
	Nick Desaulniers <ndesaulniers@google.com>,
	Tom Rix <trix@redhat.com>,
	llvm@lists.linux.dev
Subject: Re: pahole: New version 1.25 release?
Date: Fri, 20 Jan 2023 14:46:25 -0300	[thread overview]
Message-ID: <Y8rTcfB78f0G7C1j@kernel.org> (raw)
In-Reply-To: <CA+icZUVbv2T7SExVULn6Bh1mB=VpmYGbH-4U63PKrHPyi6uULQ@mail.gmail.com>

Em Fri, Jan 20, 2023 at 06:40:38PM +0100, Sedat Dilek escreveu:
> Hi Arnaldo,
> 
> I use CONFIG_DEBUG_INFO_BTF=y with LLVM-15.
> 
> Darkly, I remember I needed some post-v1.24 fixes.
> 
> Currently, I use:
> 
> $ git describe
> v1.24-26-gb72f5188856d
> 
> commit b72f5188856d
> "dwarves: Zero-initialize struct cu in cu__new() to prevent incorrect BTF types"
> 
> Any plans to release a pahole version 1.25?

Probably next week, I just have to differentiate a file with split dwarf
to remove a slight hack I have right now.

- Arnaldo
 
> Thanks.
> 
> Best regards,
> -Sedat-
> 
> P.S.: I still carry this diff around (attached as diff as Gmail might
> truncate the following lines):

Ok, that is in the same function I have to differentiate if the file
makes reference to another DWARF file (the split dwarf, .dwz thing),
I'll check this patch, thanks!
 
> $ cd /path/to/pahole.git
> 
> $ git diff dwarf_loader.c
> diff --git a/dwarf_loader.c b/dwarf_loader.c
> index 5a74035c5708..96ce5db4f5bc 100644
> --- a/dwarf_loader.c
> +++ b/dwarf_loader.c
> @@ -2808,8 +2808,8 @@ static int __cus__load_debug_types(struct
> conf_load *conf, Dwfl_Module *mod, Dwa
>        return 0;
> }
> 
> -/* Match the define in linux:include/linux/elfnote.h */
> -#define LINUX_ELFNOTE_BUILD_LTO                0x101
> +/* Match the define in linux:include/linux/elfnote-lto.h */
> +#define LINUX_ELFNOTE_LTO_INFO         0x101
> 
> static bool cus__merging_cu(Dwarf *dw, Elf *elf)
> {
> @@ -2827,7 +2827,7 @@ static bool cus__merging_cu(Dwarf *dw, Elf *elf)
>                        size_t name_off, desc_off, offset = 0;
>                        GElf_Nhdr hdr;
>                        while ((offset = gelf_getnote(data, offset,
> &hdr, &name_off, &desc_off)) != 0) {
> -                               if (hdr.n_type != LINUX_ELFNOTE_BUILD_LTO)
> +                               if (hdr.n_type != LINUX_ELFNOTE_LTO_INFO)
>                                        continue;
> 
>                                /* owner is Linux */
> 
> $ cd /path/to/linux.git
> 
> $ git describe
> v6.2-rc4-77-gd368967cb103
> 
> $ git grep LINUX_ELFNOTE_LTO_INFO include/linux/elfnote-lto.h
> include/linux/elfnote-lto.h:#define LINUX_ELFNOTE_LTO_INFO      0x101
> include/linux/elfnote-lto.h:#define BUILD_LTO_INFO
> ELFNOTE32("Linux", LINUX_ELFNOTE_LTO_INFO, 1)
> include/linux/elfnote-lto.h:#define BUILD_LTO_INFO
> ELFNOTE32("Linux", LINUX_ELFNOTE_LTO_INFO, 0)
> dileks@iniza:~/src/linux/git$ git describe
> v6.2-rc4-195-gf609936e078d
> 
> -EOT-

> diff --git a/dwarf_loader.c b/dwarf_loader.c
> index 5a74035c5708..96ce5db4f5bc 100644
> --- a/dwarf_loader.c
> +++ b/dwarf_loader.c
> @@ -2808,8 +2808,8 @@ static int __cus__load_debug_types(struct conf_load *conf, Dwfl_Module *mod, Dwa
>  	return 0;
>  }
>  
> -/* Match the define in linux:include/linux/elfnote.h */
> -#define LINUX_ELFNOTE_BUILD_LTO		0x101
> +/* Match the define in linux:include/linux/elfnote-lto.h */
> +#define LINUX_ELFNOTE_LTO_INFO		0x101
>  
>  static bool cus__merging_cu(Dwarf *dw, Elf *elf)
>  {
> @@ -2827,7 +2827,7 @@ static bool cus__merging_cu(Dwarf *dw, Elf *elf)
>  			size_t name_off, desc_off, offset = 0;
>  			GElf_Nhdr hdr;
>  			while ((offset = gelf_getnote(data, offset, &hdr, &name_off, &desc_off)) != 0) {
> -				if (hdr.n_type != LINUX_ELFNOTE_BUILD_LTO)
> +				if (hdr.n_type != LINUX_ELFNOTE_LTO_INFO)
>  					continue;
>  
>  				/* owner is Linux */


-- 

- Arnaldo

  reply	other threads:[~2023-01-20 17:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-20 17:40 pahole: New version 1.25 release? Sedat Dilek
2023-01-20 17:46 ` Arnaldo Carvalho de Melo [this message]
2023-02-02  0:08   ` Sedat Dilek
2023-01-20 19:15 ` Yonghong Song
2023-01-20 20:15   ` Sedat Dilek

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=Y8rTcfB78f0G7C1j@kernel.org \
    --to=acme@kernel.org \
    --cc=acme@redhat.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=haoluo@google.com \
    --cc=john.fastabend@gmail.com \
    --cc=jolsa@kernel.org \
    --cc=kpsingh@kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=martin.lau@linux.dev \
    --cc=natechancellor@gmail.com \
    --cc=ndesaulniers@google.com \
    --cc=sdf@google.com \
    --cc=sedat.dilek@gmail.com \
    --cc=song@kernel.org \
    --cc=trix@redhat.com \
    --cc=yhs@fb.com \
    /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