Skip to content

Libbpf eBPF function bpf_usdt_arg_cnt

v0.8.0

The bpf_usdt_arg_cnt function is used to get the number of USDT arguments available.

Definition

__weak __hidden
int bpf_usdt_arg_cnt(struct pt_regs *ctx)

Return number of USDT arguments defined for currently traced USDT.

Usage

The bpf_usdt_arg_cnt function returns the number of arguments a tracepoint has.

This function uses specifiers that describe the arguments. 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