aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/bpf/prog_tests/perf_buffer.c
diff options
context:
space:
mode:
authorYonghong Song <[email protected]>2020-08-21 18:44:20 +0000
committerAlexei Starovoitov <[email protected]>2020-08-21 21:01:39 +0000
commite60495eafdba24a466a6ae62da86245a958954bc (patch)
treec46a23fc3d9d58a4007e65db5f4502b0c6d10a1a /tools/testing/selftests/bpf/prog_tests/perf_buffer.c
parentbpf: Implement link_query callbacks in map element iterators (diff)
downloadkernel-e60495eafdba24a466a6ae62da86245a958954bc.tar.gz
kernel-e60495eafdba24a466a6ae62da86245a958954bc.zip
bpftool: Implement link_query for bpf iterators
The link query for bpf iterators is implemented. Besides being shown to the user what bpf iterator the link represents, the target_name is also used to filter out what additional information should be printed out, e.g., whether map_id should be shown or not. The following is an example of bpf_iter link dump, plain output or pretty output. $ bpftool link show 11: iter prog 59 target_name task pids test_progs(1749) 34: iter prog 173 target_name bpf_map_elem map_id 127 pids test_progs_1(1753) $ bpftool -p link show [{ "id": 11, "type": "iter", "prog_id": 59, "target_name": "task", "pids": [{ "pid": 1749, "comm": "test_progs" } ] },{ "id": 34, "type": "iter", "prog_id": 173, "target_name": "bpf_map_elem", "map_id": 127, "pids": [{ "pid": 1753, "comm": "test_progs_1" } ] } ] Signed-off-by: Yonghong Song <[email protected]> Signed-off-by: Alexei Starovoitov <[email protected]> Acked-by: Andrii Nakryiko <[email protected]> Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/perf_buffer.c')
0 files changed, 0 insertions, 0 deletions