summaryrefslogtreecommitdiff
path: root/tools/bpf/bpftool/main.c
diff options
context:
space:
mode:
authorQuentin Monnet <quentin.monnet@netronome.com>2018-12-18 13:13:18 +0300
committerDaniel Borkmann <daniel@iogearbox.net>2018-12-18 16:47:17 +0300
commitbe3245e22d227ad68ab97785d506561374daa028 (patch)
tree9eb34c8d2e69fa121c94fcba5e7419dda8eda836 /tools/bpf/bpftool/main.c
parent0d7410ea6efcdfda56773999f692bbd5d4e4bc00 (diff)
downloadlinux-be3245e22d227ad68ab97785d506561374daa028.tar.xz
tools: bpftool: attempt to mount tracefs if required for tracelog cmd
As a follow-up to commit 30da46b5dc3a ("tools: bpftool: add a command to dump the trace pipe"), attempt to mount the tracefs virtual file system if it is not detected on the system before trying to dump content of the tracing pipe on an invocation of "bpftool prog tracelog". Usually, tracefs in automatically mounted by debugfs when the user tries to access it (e.g. "ls /sys/kernel/debug/tracing" mounts the tracefs). So if we failed to find it, it is probably that debugfs is not here either. Therefore, we just attempt a single mount, at a location that does not involve debugfs: /sys/kernel/tracing. Suggested-by: Daniel Borkmann <daniel@iogearbox.net> Signed-off-by: Quentin Monnet <quentin.monnet@netronome.com> Reviewed-by: Jakub Kicinski <jakub.kicinski@netronome.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'tools/bpf/bpftool/main.c')
0 files changed, 0 insertions, 0 deletions