From: Jiri Olsa <olsajiri@gmail.com>
To: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>,
Yonghong Song <yhs@fb.com>,
dwarves@vger.kernel.org, bpf@vger.kernel.org,
Steven Rostedt <rostedt@goodmis.org>
Subject: Re: [RESEND] BTF is not generated for gcc-built kernel with the latest pahole
Date: Wed, 26 Jul 2023 12:04:08 +0200 [thread overview]
Message-ID: <ZMDvmLdZSLi2QqB+@krava> (raw)
In-Reply-To: <20230726102534.9ebc4678ad2c9395cc9be196@kernel.org>
On Wed, Jul 26, 2023 at 10:25:34AM +0900, Masami Hiramatsu wrote:
> Hello,
> (I resend this because kconfig was too big)
>
> I found that BTF is not generated for gcc-built kernel with that latest
> pahole (v1.25).
hi,
I can't reproduce on my setup with your .config
does 'bpftool btf dump file ./vmlinux' show any error?
is there any error in the kernel build output?
> When I'm using the distro origin pahole (v1.22) it works. (I also checked
> v1.23 and v1.24, both partially generated BTF)
>
> e.g.
>
> # echo 'f kfree $arg*' >> /sys/kernel/tracing/dynamic_events
> sh: write error: Invalid argument
>
> # cat /sys/kernel/tracing/error_log
> [ 21.595724] trace_fprobe: error: BTF is not available or not supported
> Command: f kfree $arg*
> ^
> [ 21.596032] trace_fprobe: error: Invalid $-valiable specified
> Command: f kfree $arg*
> ^
>
> / # strings /sys/kernel/btf/vmlinux | grep kfree
hm, if you have this file present, you have BTF in
> kfree_on_online
> maybe_kfree_parameter
> trace_event_raw_rcu_invoke_kfree_bulk_callback
> trace_event_data_offsets_rcu_invoke_kfree_bulk_callback
> btf_trace_rcu_invoke_kfree_bulk_callback
> early_boot_kfree_rcu
> __bpf_trace_rcu_invoke_kfree_bulk_callback
> perf_trace_rcu_invoke_kfree_bulk_callback
> trace_event_raw_event_rcu_invoke_kfree_bulk_callback
> trace_raw_output_rcu_invoke_kfree_bulk_callback
> __probestub_rcu_invoke_kfree_bulk_callback
> __traceiter_rcu_invoke_kfree_bulk_callback
> kfree_rcu_cpu_work
> kfree_rcu_cpu
> kfree_rcu_batch_init
> kfree_rcu_scheduler_running
> kfree_rcu_shrink_scan
> kfree_rcu_shrink_count
> kfree_rcu_monitor
> kfree_rcu_work
>
>
> Here is the gcc version which I'm using.
>
> gcc version 11.3.0 (Ubuntu 11.3.0-1ubuntu1~22.04.1)
I tried with gcc (GCC) 13.1.1 20230614 (Red Hat 13.1.1-4)
and latest pahole (master branch)
>
> I also attached the kernel config file.
>
> What is the recommended combination of the tools?
> Should I use Clang to build the kernel for BTF?
should work fine with both gcc and clang
jirka
>
> Thank you,
>
> --
> Masami Hiramatsu (Google) <mhiramat@kernel.org>
next prev parent reply other threads:[~2023-07-26 10:04 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-26 1:25 [RESEND] BTF is not generated for gcc-built kernel with the latest pahole Masami Hiramatsu
2023-07-26 10:04 ` Jiri Olsa [this message]
2023-07-26 11:07 ` Masami Hiramatsu
2023-07-26 14:46 ` Alan Maguire
2023-07-27 0:38 ` Masami Hiramatsu
2023-07-27 1:51 ` Masami Hiramatsu
2023-07-31 15:45 ` Alan Maguire
2023-08-01 1:01 ` Masami Hiramatsu
2023-08-01 17:36 ` Alan Maguire
[not found] ` <CA+JHD93Liq95RvfChifmnE7E9mKR42_W7rtpqgY9KAgYyGTZwQ@mail.gmail.com>
2023-08-01 18:28 ` Fwd: " Arnaldo Carvalho de Melo
2023-08-02 8:02 ` Masami Hiramatsu
2023-08-01 21:45 ` Arnaldo Carvalho de Melo
2023-08-02 14:29 ` Masami Hiramatsu
2023-07-27 13:10 ` 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=ZMDvmLdZSLi2QqB+@krava \
--to=olsajiri@gmail.com \
--cc=acme@redhat.com \
--cc=bpf@vger.kernel.org \
--cc=dwarves@vger.kernel.org \
--cc=mhiramat@kernel.org \
--cc=rostedt@goodmis.org \
--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 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.