Libbpf userspace function perf_buffer__consume_buffer
Consume data from perf ring buffer corresponding to slot buf_idx
in BPF_MAP_TYPE_PERF_EVENT_ARRAY
BPF map without waiting/polling. If there is no data to consume, do nothing and return success.
Definition
int perf_buffer__consume_buffer(struct perf_buffer *pb, size_t buf_idx);
Parameters
pb
: perf buffer manager to consume data frombuf_idx
: index of the perf ring buffer to consume data from
Returns
0
on success; <0
on failure.
Usage
Docs could be improved
This part of the docs is incomplete, contributions are very welcome
Example
Docs could be improved
This part of the docs is incomplete, contributions are very welcome