Re: [PATCH perf-tools-next v4 3/4] perf trace: Enhance BTF type formatting to symbolise kernel function pointers
| Newsgroups | org.kernel.vger.linux-perf-users |
|---|---|
| Message-ID | <[email protected]> |
> When BTF (BPF Type Format) metadata is loaded from vmlinux, 'perf trace' > can inspect the precise C types of tracepoint and system call parameters. > However, function pointer arguments are currently not recognised during > BTF pretty-printing and default to hexadecimal output. > > Introduce btf_is_func_ptr() to inspect BTF type hierarchies > (i.e., traversing pointers, typedefs, and type modifiers) to determine > whether a parameter resolves to a function prototype > (BTF_KIND_FUNC_PROTO). > > Generalise BTF type caching via syscall_arg_fmt__cache_btf_type() to > handle structs, unions, enums, and function pointers alike. When a field > is identified as a kernel function pointer, trace__btf_scnprintf() > routes its value to syscall_arg__scnprintf_ksym(), enabling automatic > zero-config symbolisation of kernel function pointers whenever BTF is > available. > > Signed-off-by: Aaron Tomlin <[email protected]> Sashiko has reviewed this patch and found no issues. It looks great! -- Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=3