Libbpf eBPF function bpf_usdt_arg_size
The bpf_usdt_arg_size
function is used to get the size of a USDT argument.
Definition
static __always_inline
int bpf_usdt_arg_size(struct pt_regs *ctx, __u64 arg_num)
Returns the size in bytes of the #arg_num
(zero-indexed) USDT argument. Returns negative error if argument is not found or arg_num
is invalid.
Usage
The bpf_usdt_arg
function returns the size of a given argument.
This function uses specifiers that describe the size of the argument. These specifiers live in maps, defined in usdt.bpf.h
which should be populated by the loader, in particular the bpf_program__attach_usdt
function.
Example
Docs could be improved
This part of the docs is incomplete, contributions are very welcome