diff options
author | 2023-09-25 16:22:43 -0700 | |
---|---|---|
committer | 2023-09-25 16:22:55 -0700 | |
commit | e0fa6523e02ab31a27daf52e58a0d95fd52d5300 (patch) | |
tree | 9e1a34b4d5b660644fd67a635d69cb074f864d66 /tools/perf/scripts/python/call-graph-from-postgresql.py | |
parent | Merge branch 'libbpf: Support symbol versioning for uprobe' (diff) | |
parent | selftests/bpf: Add tests for ring__consume (diff) | |
download | wireguard-linux-e0fa6523e02ab31a27daf52e58a0d95fd52d5300.tar.xz wireguard-linux-e0fa6523e02ab31a27daf52e58a0d95fd52d5300.zip |
Merge branch 'add libbpf getters for individual ringbuffers'
Martin Kelly says:
====================
This patch series adds a new ring__ API to libbpf exposing getters for
accessing the individual ringbuffers inside a struct ring_buffer. This is
useful for polling individually, getting available data, or similar use
cases. The API looks like this, and was roughly proposed by Andrii Nakryiko
in another thread:
Getting a ring struct:
struct ring *ring_buffer__ring(struct ring_buffer *rb, unsigned int idx);
Using the ring struct:
unsigned long ring__consumer_pos(const struct ring *r);
unsigned long ring__producer_pos(const struct ring *r);
size_t ring__avail_data_size(const struct ring *r);
size_t ring__size(const struct ring *r);
int ring__map_fd(const struct ring *r);
int ring__consume(struct ring *r);
Changes in v2:
- Addressed all feedback from Andrii Nakryiko
====================
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/call-graph-from-postgresql.py')
0 files changed, 0 insertions, 0 deletions