aboutsummaryrefslogtreecommitdiffstats
path: root/include/uapi/linux/bpf.h
diff options
context:
space:
mode:
authorPeter Wu <peter@lekensteyn.nl>2019-08-21 00:08:59 +0100
committerAlexei Starovoitov <ast@kernel.org>2019-08-21 10:17:25 -0700
commit55c33dfbeb831eb3ab7cc1a3e295b0d4d57f23a3 (patch)
tree593b2893cd2832bbc1f7a582d9842796829adfd5 /include/uapi/linux/bpf.h
parentbpf: fix 'struct pt_reg' typo in documentation (diff)
downloadlinux-dev-55c33dfbeb831eb3ab7cc1a3e295b0d4d57f23a3.tar.xz
linux-dev-55c33dfbeb831eb3ab7cc1a3e295b0d4d57f23a3.zip
bpf: clarify when bpf_trace_printk discards lines
I opened /sys/kernel/tracing/trace once and kept reading from it. bpf_trace_printk somehow did not seem to work, no entries were appended to that trace file. It turns out that tracing is disabled when that file is open. Save the next person some time and document this. The trace file is described in Documentation/trace/ftrace.rst, however the implication "tracing is disabled" did not immediate translate to "bpf_trace_printk silently discards entries". Signed-off-by: Peter Wu <peter@lekensteyn.nl> Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'include/uapi/linux/bpf.h')
-rw-r--r--include/uapi/linux/bpf.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h
index 267544e140be..b5889257cc33 100644
--- a/include/uapi/linux/bpf.h
+++ b/include/uapi/linux/bpf.h
@@ -580,6 +580,8 @@ union bpf_attr {
* limited to five).
*
* Each time the helper is called, it appends a line to the trace.
+ * Lines are discarded while *\/sys/kernel/debug/tracing/trace* is
+ * open, use *\/sys/kernel/debug/tracing/trace_pipe* to avoid this.
* The format of the trace is customizable, and the exact output
* one will get depends on the options set in
* *\/sys/kernel/debug/tracing/trace_options* (see also the