libbpf: add perf buffer abstraction and API
Status from this message: Applied, thanks!
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v7 Latest5 patches 1 replyApplied
- v65 patches 3 repliesSuperseded
- v55 patches 3 repliesSuperseded
Earlier versions · 4
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v4 | 4 patches | 3 replies | Superseded | |
| v3 | 4 patches | 3 replies | Superseded | |
| v2 | 3 patches | 9 replies | Superseded | |
| v1 | 2 patches | 4 replies | Superseded |
Changes in v7 from the cover letter
- __x64_ syscall prefix (Yonghong);
Patches in v7 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/5 | libbpf: add perf buffer APItools/ tools/ tools/ | +419 | 0 replies | |
| 2/5 | libbpf: auto-set PERF_EVENT_ARRAY size to number of CPUstools/ | +24 | 0 replies | |
| 3/5 | selftests/bpf: test perf buffer APItools/ tools/ | +125 | 0 replies | |
| 4/5 | tools/bpftool: switch map event_pipe to libbpf's perf_buffertools/ | +64 | 0 replies | |
| 5/5 | libbpf: add perf_buffer_ prefix to READMEtools/ | +2 | 0 replies |
Reviews trailers per patch
All 5 patches have a Reviewed-by or Acked-by.
| Patch | Yonghong Song | Song Liu | Jakub Kicinski |
|---|---|---|---|
| 1/5 | A-b | ||
| 2/5 | A-b | A-b | |
| 3/5 | A-b | A-b | |
| 4/5 | A-b | A-b | |
| 5/5 | A-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.
Cover letter [PATCH v7 bpf-next 0/5] libbpf: add perf buffer abstraction and API
This patchset adds a high-level API for setting up and polling perf buffers associated with BPF_MAP_TYPE_PERF_EVENT_ARRAY map. Details of APIs are described in corresponding commit.
Patch #1 adds a set of APIs to set up and work with perf buffer. Patch #2 enhances libbpf to support auto-setting PERF_EVENT_ARRAY map size. Patch #3 adds test.
Patch #4 converts bpftool map event_pipe to new API.
Patch #5 updates README to mention perf_buffer_ prefix.
v6->v7:
- __x64_ syscall prefix (Yonghong);v5->v6:
- fix C99 for loop variable initialization usage (Yonghong); v4->v5:
- initialize perf_buffer_raw_opts in bpftool map event_pipe (Jakub);
- add perf_buffer_ to README;v3->v4:
- fixed bpftool event_pipe cmd error handling (Jakub); v2->v3:
- added perf_buffer__new_raw for more low-level control;
- converted bpftool map event_pipe to new API (Daniel);
- fixed bug with error handling in create_maps (Song); v1->v2:
- add auto-sizing of PERF_EVENT_ARRAY maps;
Andrii Nakryiko (5):
libbpf: add perf buffer API
libbpf: auto-set PERF_EVENT_ARRAY size to number of CPUs selftests/bpf: test perf buffer API
tools/bpftool: switch map event_pipe to libbpf's perf_buffer
libbpf: add perf_buffer_ prefix to README
tools/bpf/bpftool/map_perf_ring.c | 201 +++------ tools/lib/bpf/README.rst | 3 +- tools/lib/bpf/libbpf.c | 397 +++++++++++++++++- tools/lib/bpf/libbpf.h | 49 +++ tools/lib/bpf/libbpf.map | 4 + .../selftests/bpf/prog_tests/perf_buffer.c | 100 +++++ .../selftests/bpf/progs/test_perf_buffer.c | 25 ++ 7 files changed, 634 insertions(+), 145 deletions(-) create mode 100644 tools/testing/selftests/bpf/prog_tests/perf_buffer.c create mode 100644 tools/testing/selftests/bpf/progs/test_perf_buffer.c
Signature · 1 line
2.17.1