OSDN Git Service

bpf: use canonical ftrace path
authorRoss Zwisler <zwisler@google.com>
Mon, 13 Mar 2023 20:56:27 +0000 (14:56 -0600)
committerAlexei Starovoitov <ast@kernel.org>
Tue, 14 Mar 2023 04:51:30 +0000 (21:51 -0700)
commit27d7fdf06fdb84455ff585b58c8034e2fab42583
tree6db438ddc306f32e69758cbcc1d69cbf3e10e298
parent9e36a204bd43553a9cd4bd574612cd9a5df791ea
bpf: use canonical ftrace path

The canonical location for the tracefs filesystem is at /sys/kernel/tracing.

But, from Documentation/trace/ftrace.rst:

  Before 4.1, all ftrace tracing control files were within the debugfs
  file system, which is typically located at /sys/kernel/debug/tracing.
  For backward compatibility, when mounting the debugfs file system,
  the tracefs file system will be automatically mounted at:

  /sys/kernel/debug/tracing

Many comments and samples in the bpf code still refer to this older
debugfs path, so let's update them to avoid confusion.  There are a few
spots where the bpf code explicitly checks both tracefs and debugfs
(tools/bpf/bpftool/tracelog.c and tools/lib/api/fs/fs.c) and I've left
those alone so that the tools can continue to work with both paths.

Signed-off-by: Ross Zwisler <zwisler@google.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Link: https://lore.kernel.org/r/20230313205628.1058720-2-zwisler@kernel.org
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
include/uapi/linux/bpf.h
samples/bpf/cpustat_kern.c
samples/bpf/hbm.c
samples/bpf/ibumad_kern.c
samples/bpf/lwt_len_hist.sh
samples/bpf/offwaketime_kern.c
samples/bpf/task_fd_query_user.c
samples/bpf/test_lwt_bpf.sh
samples/bpf/test_overhead_tp.bpf.c
tools/include/uapi/linux/bpf.h