* pahole: New version 1.25 release?
@ 2023-01-20 17:40 Sedat Dilek
2023-01-20 17:46 ` Arnaldo Carvalho de Melo
2023-01-20 19:15 ` Yonghong Song
0 siblings, 2 replies; 5+ messages in thread
From: Sedat Dilek @ 2023-01-20 17:40 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo
Cc: Alexei Starovoitov, Daniel Borkmann, Andrii Nakryiko,
Martin KaFai Lau, Song Liu, Yonghong Song, John Fastabend,
KP Singh, Stanislav Fomichev, Hao Luo, Jiri Olsa, bpf,
Nathan Chancellor, Nick Desaulniers, Tom Rix, llvm
[-- Attachment #1: Type: text/plain, Size: 2018 bytes --]
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?
Thanks.
Best regards,
-Sedat-
P.S.: I still carry this diff around (attached as diff as Gmail might
truncate the following lines):
$ 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-
[-- Attachment #2: dwarf_loader-LINUX_ELFNOTE_LTO_INFO.diff --]
[-- Type: text/x-patch, Size: 856 bytes --]
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 */
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: pahole: New version 1.25 release?
2023-01-20 17:40 pahole: New version 1.25 release? Sedat Dilek
@ 2023-01-20 17:46 ` Arnaldo Carvalho de Melo
2023-02-02 0:08 ` Sedat Dilek
2023-01-20 19:15 ` Yonghong Song
1 sibling, 1 reply; 5+ messages in thread
From: Arnaldo Carvalho de Melo @ 2023-01-20 17:46 UTC (permalink / raw)
To: Sedat Dilek
Cc: Arnaldo Carvalho de Melo, Alexei Starovoitov, Daniel Borkmann,
Andrii Nakryiko, Martin KaFai Lau, Song Liu, Yonghong Song,
John Fastabend, KP Singh, Stanislav Fomichev, Hao Luo, Jiri Olsa,
bpf, Nathan Chancellor, Nick Desaulniers, Tom Rix, llvm
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: pahole: New version 1.25 release?
2023-01-20 17:40 pahole: New version 1.25 release? Sedat Dilek
2023-01-20 17:46 ` Arnaldo Carvalho de Melo
@ 2023-01-20 19:15 ` Yonghong Song
2023-01-20 20:15 ` Sedat Dilek
1 sibling, 1 reply; 5+ messages in thread
From: Yonghong Song @ 2023-01-20 19:15 UTC (permalink / raw)
To: sedat.dilek, Arnaldo Carvalho de Melo
Cc: Alexei Starovoitov, Daniel Borkmann, Andrii Nakryiko,
Martin KaFai Lau, Song Liu, Yonghong Song, John Fastabend,
KP Singh, Stanislav Fomichev, Hao Luo, Jiri Olsa, bpf,
Nathan Chancellor, Nick Desaulniers, Tom Rix, llvm
On 1/20/23 9:40 AM, Sedat Dilek wrote:
> 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?
>
> Thanks.
>
> Best regards,
> -Sedat-
>
> P.S.: I still carry this diff around (attached as diff as Gmail might
> truncate the following lines):
>
> $ 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 */
Ya, LINUX_ELFNOTE_BUILD_LTO is initially proposed macro name but later
the formal kernel patch used LINUX_ELFNOTE_LTO_INFO. Could you submit
a pahole for this so it is consistent with kernel? Thanks!
>
> $ 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-
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: pahole: New version 1.25 release?
2023-01-20 19:15 ` Yonghong Song
@ 2023-01-20 20:15 ` Sedat Dilek
0 siblings, 0 replies; 5+ messages in thread
From: Sedat Dilek @ 2023-01-20 20:15 UTC (permalink / raw)
To: Yonghong Song
Cc: Arnaldo Carvalho de Melo, Alexei Starovoitov, Daniel Borkmann,
Andrii Nakryiko, Martin KaFai Lau, Song Liu, Yonghong Song,
John Fastabend, KP Singh, Stanislav Fomichev, Hao Luo, Jiri Olsa,
bpf, Nathan Chancellor, Nick Desaulniers, Tom Rix, llvm
On Fri, Jan 20, 2023 at 8:15 PM Yonghong Song <yhs@meta.com> wrote:
>
>
>
> On 1/20/23 9:40 AM, Sedat Dilek wrote:
> > 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?
> >
> > Thanks.
> >
> > Best regards,
> > -Sedat-
> >
> > P.S.: I still carry this diff around (attached as diff as Gmail might
> > truncate the following lines):
> >
> > $ 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 */
>
> Ya, LINUX_ELFNOTE_BUILD_LTO is initially proposed macro name but later
> the formal kernel patch used LINUX_ELFNOTE_LTO_INFO. Could you submit
> a pahole for this so it is consistent with kernel? Thanks!
>
Patch sent, see:
https://lore.kernel.org/all/20230120201203.10785-1-sedat.dilek@gmail.com/
-Sedat-
> >
> > $ 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-
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: pahole: New version 1.25 release?
2023-01-20 17:46 ` Arnaldo Carvalho de Melo
@ 2023-02-02 0:08 ` Sedat Dilek
0 siblings, 0 replies; 5+ messages in thread
From: Sedat Dilek @ 2023-02-02 0:08 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo
Cc: Arnaldo Carvalho de Melo, Alexei Starovoitov, Daniel Borkmann,
Andrii Nakryiko, Martin KaFai Lau, Song Liu, Yonghong Song,
John Fastabend, KP Singh, Stanislav Fomichev, Hao Luo, Jiri Olsa,
bpf, Nathan Chancellor, Nick Desaulniers, Tom Rix, llvm
On Fri, Jan 20, 2023 at 6:46 PM Arnaldo Carvalho de Melo
<arnaldo.melo@gmail.com> wrote:
>
> Probably next week, I just have to differentiate a file with split dwarf
> to remove a slight hack I have right now.
>
Thanks for pushing "dwarf_loader: Sync with LINUX_ELFNOTE_LTO_INFO
macro from kernel".
I see some updates in pahole.git#next with some Tested.by#s of you.
So, we are very close to a pre-1.25 release :-)?
Planning to test with Linux-v6.2-rc7...
-Sedat-
[1] https://git.kernel.org/pub/scm/devel/pahole/pahole.git/log/?h=next
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-02-02 0:09 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-20 17:40 pahole: New version 1.25 release? Sedat Dilek
2023-01-20 17:46 ` Arnaldo Carvalho de Melo
2023-02-02 0:08 ` Sedat Dilek
2023-01-20 19:15 ` Yonghong Song
2023-01-20 20:15 ` Sedat Dilek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox