libbpf / bpftool

Automated upstream mirror for bpftool stand-alone build.
Other
377 stars 69 forks source link

Dump libbpf's output for `build_obj_refs_table()` when user asks for debug info #137

Closed qmonnet closed 5 months ago

qmonnet commented 6 months ago

Passing -d or --debug to bpftool should results in bpftool dumping all logs from libbpf. However, in build_obj_refs_table() in pids.c, we explicitly disable logs to avoid the output to be “polluted with libbpf errors if bpf_iter is not supported”. While this is fine for the regular case, these logs should still be displayed in debug mode.

qmonnet commented 5 months ago

https://lore.kernel.org/bpf/20240320012241.42991-1-qmo@kernel.org/T/#u

qmonnet commented 5 months ago

Merged upstream, will be pulled with the next sync.