From: Eduard Zingerman <eddyz87@gmail.com>
To: Arnaldo Carvalho de Melo <acme@kernel.org>,
Alan Maguire <alan.maguire@oracle.com>
Cc: Jiri Olsa <jolsa@kernel.org>,
Clark Williams <williams@redhat.com>,
Kate Carcia <kcarcia@redhat.com>,
dwarves@vger.kernel.org,
Arnaldo Carvalho de Melo <acme@redhat.com>,
Matthias Schwarzott <zzam@gentoo.org>,
Andrii Nakryiko <andrii@kernel.org>, Song Liu <song@kernel.org>,
Yonghong Song <yonghong.song@linux.dev>
Subject: Re: [PATCH 3/5] pahole: Honour exclusive BTF loading
Date: Tue, 19 Nov 2024 14:04:58 -0800 [thread overview]
Message-ID: <a1366bfad38306b2e7e41549ba1ac2ed217b94ff.camel@gmail.com> (raw)
In-Reply-To: <20241119134032.783215-4-acme@kernel.org>
On Tue, 2024-11-19 at 10:40 -0300, Arnaldo Carvalho de Melo wrote:
[...]
I tried the following test on top of this patch-set:
----- 8< ----------------------------------------
#!/bin/bash
cat <<EOF | clang -o btf-and-dwarf.o -c -x c -g - || exit 1
struct test_val { int i; } g;
EOF
pahole --btf_encode btf-and-dwarf.o || exit 1
# Note: has to be llvm-strip, otherwise --no-strip-all is not available
llvm-strip -o only-dwarf.o --no-strip-all -R .BTF -R .BTF.ext btf-and-dwarf.o
llvm-strip -o only-btf.o --no-strip-all --strip-debug btf-and-dwarf.o
for fmt in none btf dwarf dwarf,btf; do
for file in no-such-file only-btf.o only-dwarf.o btf-and-dwarf.o; do
if [ "$fmt" == "none" ]; then
cmd="pahole"
else
cmd="pahole -F ${fmt}"
fi
printf -- "------ PAHOLE_VMLINUX_BTF_FILENAME=%-20s %-20s ------\n" "${file}" "${cmd}"
PAHOLE_VMLINUX_BTF_FILENAME=$file $cmd 2>&1 | grep -P '(test_val|pahole:)'
done
done
---------------------------------------- >8 -----
And there are a few surprising (to me) results, namely:
------ PAHOLE_VMLINUX_BTF_FILENAME=only-dwarf.o pahole ------
pahole: couldn't find any debug information on this system.
...
------ PAHOLE_VMLINUX_BTF_FILENAME=only-dwarf.o pahole -F dwarf ------
pahole: couldn't find any debug information on this system.
...
------ PAHOLE_VMLINUX_BTF_FILENAME=btf-and-dwarf.o pahole -F dwarf ------
pahole: couldn't find any debug information on this system.
...
------ PAHOLE_VMLINUX_BTF_FILENAME=only-dwarf.o pahole -F dwarf,btf ------
pahole: couldn't find any debug information on this system.
...
It looks like DWARF is never loaded.
llvm-dwarfdump shows that DWARF is indeed present in only-dwarf.o and
btf-and-dwarf.o. Is this an expected behaviour?
next prev parent reply other threads:[~2024-11-19 22:05 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-19 13:40 [PATCH 0/5] Fix segfaults related to missing BTF support Arnaldo Carvalho de Melo
2024-11-19 13:40 ` [PATCH 1/5] core: Add method to get the vmlinux BTF filename, allow overriding it via env var Arnaldo Carvalho de Melo
2024-11-19 13:40 ` [PATCH 2/5] tests default_vmlinux_btf: Introduce test for using BTF by default Arnaldo Carvalho de Melo
2024-11-19 13:40 ` [PATCH 3/5] pahole: Honour exclusive BTF loading Arnaldo Carvalho de Melo
2024-11-19 17:47 ` Alan Maguire
2024-11-19 20:18 ` Arnaldo Carvalho de Melo
2024-11-19 20:19 ` Arnaldo Carvalho de Melo
2024-11-19 22:04 ` Eduard Zingerman [this message]
2024-11-19 22:28 ` Alan Maguire
2024-11-19 22:33 ` Eduard Zingerman
2024-11-19 13:40 ` [PATCH 4/5] tests default_vmlinux_btf: Cover the no args segfault too Arnaldo Carvalho de Melo
2024-11-19 13:40 ` [PATCH 5/5] core, libctf: Check if constructor arguments are NULL before using them Arnaldo Carvalho de Melo
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=a1366bfad38306b2e7e41549ba1ac2ed217b94ff.camel@gmail.com \
--to=eddyz87@gmail.com \
--cc=acme@kernel.org \
--cc=acme@redhat.com \
--cc=alan.maguire@oracle.com \
--cc=andrii@kernel.org \
--cc=dwarves@vger.kernel.org \
--cc=jolsa@kernel.org \
--cc=kcarcia@redhat.com \
--cc=song@kernel.org \
--cc=williams@redhat.com \
--cc=yonghong.song@linux.dev \
--cc=zzam@gentoo.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.