Re: [PATCH 0/5] trace-cmd: Use BTF to parse function arguments
Douglas Raillard <[email protected]> Mon, 4 Aug 2025 15:28:58 +0100
| Newsgroups | org.kernel.vger.linux-trace-devel |
|---|---|
| Message-ID | <[email protected]> |
On 04-08-2025 13:45, Steven Rostedt wrote: > On Mon, 4 Aug 2025 13:36:26 +0100 > Douglas Raillard <[email protected]> wrote: > >> On 31-07-2025 21:20, Steven Rostedt wrote: >>> From: "Steven Rostedt (Google)" <[email protected]> >>> >>> If function tracer is recorded with func-args option set, or the >>> function_graph tracer is recorded with the funcgraph-args option set, then >>> record the BTF file in a new BTF_FILE section in the trace.dat file. >> >> Would it be possible to also add an explicit CLI flag to collect the BTF blob ? > > Sure, that shouldn't be to hard. We could add --btf /path/to/file for both > the record and the report. Sounds like a good idea. If you want to support passing BTF at report time to supplement a BTF-less trace.dat, it would make sense to also support getting BTF from the ELF section so that people can pass the real vmlinux file directly (not the BTF blob in sysfs, the actual ELF vmlinux from Kbuild). It seems libbpf allows to do that with bpf_object__open_file(): https://docs.ebpf.io/ebpf-library/libbpf/userspace/bpf_object__open_file/ > -- Steve -- Douglas