From: Alan Maguire <alan.maguire@oracle.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Jakub Kicinski <kuba@kernel.org>,
Johannes Berg <johannes@sipsolutions.net>,
linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org,
netdev@vger.kernel.org, linux-wireless@vger.kernel.org
Subject: Re: [PATCH 0/4] tracing: improve symbolic printing
Date: Wed, 4 Oct 2023 23:07:34 +0100 [thread overview]
Message-ID: <ce2c92ea-9160-f14c-f3e5-aa11edd2e05b@oracle.com> (raw)
In-Reply-To: <20231004174321.5afa2fb6@gandalf.local.home>
On 04/10/2023 22:43, Steven Rostedt wrote:
> On Wed, 4 Oct 2023 22:35:07 +0100
> Alan Maguire <alan.maguire@oracle.com> wrote:
>
>> One thing we've heard from some embedded folks [1] is that having
>> kernel BTF loadable as a separate module (rather than embedded in
>> vmlinux) would help, as there are size limits on vmlinux that they can
>> workaround by having modules on a different partition. We're hoping
>> to get that working soon. I was wondering if you see other issues around
>> BTF adoption for embedded systems that we could put on the to-do list?
>> Not necessarily for this particular use-case (since there are
>> complications with trace data as you describe), but just trying to make
>> sure we can remove barriers to BTF adoption where possible.
>
> I wonder how easy is it to create subsets of BTF. For one thing, in the
> future we want to be able to trace the arguments of all functions. That is,
> tracing all functions at the same time (function tracer) and getting the
> arguments within the trace.
>
> This would only require information about functions and their arguments,
> which would be very useful. Is BTF easy to break apart? That is, just
> generate the information needed for function arguments?
>
There has been a fair bit of effort around this from the userspace side;
the BTF gen efforts were focused around applications carrying the
minimum BTF for their needs, so just the structures needed by the
particular BPF programs rather than the full set of vmlinux structures
for example [1].
Parsing BTF in-kernel to pull out the BTF functions (BTF_KIND_FUNC),
their prototypes (BTF_KIND_FUNC_PROTO) and all associated parameters
would be pretty straightforward I think, especially if you don't need
the structures that are passed via pointers. So if you're starting with
the full BTF, creating a subset for use in tracing would be reasonably
straightforward. My personal preference would always be to have the
full BTF where possible, but if that wasn't feasible on some systems
we'd need to add some options to pahole/libbpf to support such trimming
during the DWARF->BTF translation process.
Alan
[1] https://lore.kernel.org/bpf/20220209222646.348365-7-mauricio@kinvolk.io/
> Note, pretty much all functions do not pass structures by values, and this
> would not need to know the contents of a pointer to a structure. This would
> mean that structure layout information is not needed.
>
> -- Steve
>
next prev parent reply other threads:[~2023-10-04 22:07 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-21 8:51 [PATCH 0/4] tracing: improve symbolic printing Johannes Berg
2023-09-21 8:51 ` [RFC PATCH 1/4] tracing: add __print_sym() to replace __print_symbolic() Johannes Berg
2023-09-21 15:17 ` Johannes Berg
2023-09-21 8:51 ` [RFC PATCH 2/4] net: dropreason: use new __print_sym() in tracing Johannes Berg
2023-09-21 8:51 ` [RFC PATCH 3/4] net: drop_monitor: use drop_reason_lookup() Johannes Berg
2023-09-21 17:54 ` Johannes Berg
2023-09-21 8:51 ` [RFC PATCH 4/4] tracing/timer: use __print_sym() Johannes Berg
2023-10-04 16:22 ` [PATCH 0/4] tracing: improve symbolic printing Jakub Kicinski
2023-10-04 16:35 ` Steven Rostedt
2023-10-04 16:54 ` Jakub Kicinski
2023-10-04 17:29 ` Steven Rostedt
2023-10-04 21:35 ` Alan Maguire
2023-10-04 21:43 ` Steven Rostedt
2023-10-04 22:07 ` Alan Maguire [this message]
2023-10-04 18:38 ` Johannes Berg
2023-10-04 18:46 ` Steven Rostedt
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=ce2c92ea-9160-f14c-f3e5-aa11edd2e05b@oracle.com \
--to=alan.maguire@oracle.com \
--cc=johannes@sipsolutions.net \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=rostedt@goodmis.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 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 NNTP newsgroup(s).