Libbpf userspace function perf_buffer__consume
Consume available perf buffer data without event polling.
Definition
int perf_buffer__consume(struct perf_buffer *pb);
Parameters
pb
: perf buffer manager to consume data from
Returns
Number of records consumed across all registered perf buffers (or INT_MAX
, whichever is less), or negative number if any of the callbacks return error.
Usage
Call this function to consume available data on any of the perf buffer. This function will not block, it will consume all available data and return immediately.
Example
Docs could be improved
This part of the docs is incomplete, contributions are very welcome