linux/tools/bpf/bpftool
Kumar Kartikeya Dwivedi 876f5ebd58 bpftool: Add support for dumping streams
Add support for printing the BPF stream contents of a program in
bpftool. The new bpftool prog tracelog command is extended to take
stdout and stderr arguments, and then the prog specification.

The bpf_prog_stream_read() API added in previous patch is simply reused
to grab data and then it is dumped to the respective file. The stdout
data is sent to stdout, and stderr is printed to stderr.

Cc: Quentin Monnet <qmo@kernel.org>
Signed-off-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Link: https://lore.kernel.org/r/20250703204818.925464-12-memxor@gmail.com
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
2025-07-03 19:30:07 -07:00
..
bash-completion bpftool: Add support for dumping streams 2025-07-03 19:30:07 -07:00
Documentation bpftool: Add support for dumping streams 2025-07-03 19:30:07 -07:00
skeleton bpftool: Fix typo in MAX_NUM_METRICS macro name 2024-06-03 16:58:27 +02:00
.gitignore
btf.c bpftool: Use appropriate permissions for map access 2025-06-20 11:13:03 -07:00
btf_dumper.c bpftool: Using the right format specifiers 2025-03-17 13:50:56 -07:00
cfg.c bpftool: Fix control flow graph segfault during edge creation 2025-01-10 14:16:13 -08:00
cfg.h bpftool: Support printing opcodes and source file references in CFG 2023-04-05 21:27:27 -07:00
cgroup.c bpftool: Fix cgroup command to only show cgroup bpf programs 2025-05-08 11:34:56 -07:00
common.c bpftool: Use appropriate permissions for map access 2025-06-20 11:13:03 -07:00
feature.c bpftool: Probe for ISA v4 instruction set extension 2024-12-12 17:25:17 +01:00
gen.c bpftool: Using the right format specifiers 2025-02-10 16:08:13 -08:00
iter.c bpftool: Use appropriate permissions for map access 2025-06-20 11:13:03 -07:00
jit_disasm.c bpftool: Using the right format specifiers 2025-03-17 13:50:56 -07:00
json_writer.c tools: bpftool: json: Fix backslash escape typo in jsonw_puts 2023-03-29 09:48:45 -07:00
json_writer.h tools: bpftool: json: Fix backslash escape typo in jsonw_puts 2023-03-29 09:48:45 -07:00
link.c bpftool: Use appropriate permissions for map access 2025-06-20 11:13:03 -07:00
main.c bpftool: Fix JSON writer resource leak in version command 2025-06-17 13:28:26 -07:00
main.h bpftool: Use appropriate permissions for map access 2025-06-20 11:13:03 -07:00
Makefile bpf-next-6.15 2025-03-30 12:43:03 -07:00
map.c bpftool: Use appropriate permissions for map access 2025-06-20 11:13:03 -07:00
map_perf_ring.c bpftool: Use appropriate permissions for map access 2025-06-20 11:13:03 -07:00
net.c bpftool: Fix memory leak in dump_xx_nlmsg on realloc failure 2025-06-20 11:32:36 -07:00
netlink_dumper.c bpftool: Using the right format specifiers 2025-03-17 13:50:56 -07:00
netlink_dumper.h bpftool: Extend net dump with tcx progs 2023-07-19 10:07:28 -07:00
perf.c bpftool: fix perf help message 2023-08-11 20:54:29 -07:00
pids.c bpftool: ensure task comm is always NUL-terminated 2024-11-05 17:12:29 -08:00
prog.c bpftool: Add support for dumping streams 2025-07-03 19:30:07 -07:00
struct_ops.c bpftool: Mount bpffs on provided dir instead of parent dir 2024-04-04 15:37:12 -07:00
tracelog.c bpftool: Using the right format specifiers 2025-03-17 13:50:56 -07:00
xlated_dumper.c bpftool: Using the right format specifiers 2025-03-17 13:50:56 -07:00
xlated_dumper.h bpftool: Dump the kernel symbol's module name 2023-07-11 20:07:50 -07:00