Libbpf userspace function bpf_raw_tracepoint_open_opts
Low level wrapper around the BPF_RAW_TRACEPOINT_OPEN
syscall command.
Definition
int bpf_raw_tracepoint_open_opts(int prog_fd, struct bpf_raw_tp_opts *opts);
Parameters
prog_fd
: BPF program file descriptoropts
: options for configuring the raw tracepoint
Return
>0
, file descriptor of the raw tracepoint; negative error code, otherwise
struct bpf_raw_tp_opts
struct bpf_raw_tp_opts {
size_t sz; /* size of this struct for forward/backward compatibility */
const char *tp_name;
__u64 cookie;
size_t :0;
};
Usage
This function should only be used if you need precise control over the raw tracepoint opening process. In most cases the bpf_program__attach_raw_tracepoint
or bpf_program__attach_raw_tracepoint_opts
function should be used instead.
Example
Docs could be improved
This part of the docs is incomplete, contributions are very welcome