]> git.baikalelectronics.ru Git - kernel.git/commit
libbpf: Add API to consume the perf ring buffer content
authorEelco Chaudron <echaudro@redhat.com>
Tue, 26 May 2020 09:21:42 +0000 (11:21 +0200)
committerAlexei Starovoitov <ast@kernel.org>
Mon, 1 Jun 2020 21:38:19 +0000 (14:38 -0700)
commit4b02e258fbe7fce7d532143b011a174e456c424d
tree2a0a27eb06b4c0b624d4bf7aa45deb9ffdf57798
parentb3766505a9cb84ec54214203fe6ac0c82d3c192c
libbpf: Add API to consume the perf ring buffer content

This new API, perf_buffer__consume, can be used as follows:

- When you have a perf ring where wakeup_events is higher than 1,
  and you have remaining data in the rings you would like to pull
  out on exit (or maybe based on a timeout).

- For low latency cases where you burn a CPU that constantly polls
  the queues.

Signed-off-by: Eelco Chaudron <echaudro@redhat.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Andrii Nakryiko <andriin@fb.com>
Link: https://lore.kernel.org/bpf/159048487929.89441.7465713173442594608.stgit@ebuild
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
tools/lib/bpf/libbpf.c
tools/lib/bpf/libbpf.h
tools/lib/bpf/libbpf.map