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
1647 * Description1647 * Description
1648 * This helper is a "printk()-like" facility for debugging. It1648 * This helper is a "printk()-like" facility for debugging. It
1649 * prints a message defined by format *fmt* (of size *fmt_size*)1649 * prints a message defined by format *fmt* (of size *fmt_size*)
1650 * to file *\/sys/kernel/debug/tracing/trace* from DebugFS, if1650 * to file *\/sys/kernel/tracing/trace* from TraceFS, if
1651 * available. It can take up to three additional **u64**1651 * available. It can take up to three additional **u64**
1652 * arguments (as an eBPF helpers, the total number of arguments is1652 * arguments (as an eBPF helpers, the total number of arguments is
1653 * limited to five).1653 * limited to five).
1654 *1654 *
1655 * Each time the helper is called, it appends a line to the trace.1655 * Each time the helper is called, it appends a line to the trace.
1656 * Lines are discarded while *\/sys/kernel/debug/tracing/trace* is1656 * Lines are discarded while *\/sys/kernel/tracing/trace* is
1657 * open, use *\/sys/kernel/debug/tracing/trace_pipe* to avoid this.1657 * open, use *\/sys/kernel/tracing/trace_pipe* to avoid this.
1658 * The format of the trace is customizable, and the exact output1658 * The format of the trace is customizable, and the exact output
1659 * one will get depends on the options set in1659 * one will get depends on the options set in
1660 * *\/sys/kernel/debug/tracing/trace_options* (see also the1660 * *\/sys/kernel/tracing/trace_options* (see also the
1661 * *README* file under the same directory). However, it usually1661 * *README* file under the same directory). However, it usually
1662 * defaults to something like:1662 * defaults to something like:
1663 *1663 *

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