History

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.

Ross Zwisler committed 3 years ago

Commit 27d7fdf1 parent 9e36a2010 files · +21 −21Browse files

Showing the changes to include/uapi (1 of 10 files). Show all

Unified · Split

include/uapi/linux/bpf.h+4−4
@@ -1647,17 +1647,17 @@ union bpf_attr { · 1646 unmodified lines
16471647 * Description
16481648 * This helper is a "printk()-like" facility for debugging. It
16491649 * prints a message defined by format *fmt* (of size *fmt_size*)
1650− * to file *\/sys/kernel/debug/tracing/trace* from DebugFS, if
1650+ * to file *\/sys/kernel/tracing/trace* from TraceFS, if
16511651 * available. It can take up to three additional **u64**
16521652 * arguments (as an eBPF helpers, the total number of arguments is
16531653 * limited to five).
16541654 *
16551655 * Each time the helper is called, it appends a line to the trace.
1656− * Lines are discarded while *\/sys/kernel/debug/tracing/trace* is
1657− * open, use *\/sys/kernel/debug/tracing/trace_pipe* to avoid this.
1656+ * Lines are discarded while *\/sys/kernel/tracing/trace* is
1657+ * open, use *\/sys/kernel/tracing/trace_pipe* to avoid this.
16581658 * The format of the trace is customizable, and the exact output
16591659 * one will get depends on the options set in
1660− * *\/sys/kernel/debug/tracing/trace_options* (see also the
1660+ * *\/sys/kernel/tracing/trace_options* (see also the
16611661 * *README* file under the same directory). However, it usually
16621662 * defaults to something like:
16631663 *

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t