[PATCH v4 6/6] trace-cmd documenatation: Update the trace.dat man page for BTF_FILE

Steven Rostedt <[email protected]> Tue, 3 Feb 2026 18:32:29 -0500
Newsgroups org.kernel.vger.linux-trace-devel
Message-ID <[email protected]>
From: "Steven Rostedt (Google)" <[email protected]>

Now that the trace.dat file has a way to store the BTF file, update the
documentation about it.

Link: https://lore.kernel.org/all/[email protected]/

Suggested-by: Douglas Raillard <[email protected]>
Signed-off-by: Steven Rostedt (Google) <[email protected]>
---
 .../trace-cmd/trace-cmd.dat.v7.5.txt          | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/Documentation/trace-cmd/trace-cmd.dat.v7.5.txt b/Documentation/trace-cmd/trace-cmd.dat.v7.5.txt
index 2f7e6a4a4654..73857d1a04f8 100644
--- a/Documentation/trace-cmd/trace-cmd.dat.v7.5.txt
+++ b/Documentation/trace-cmd/trace-cmd.dat.v7.5.txt
@@ -270,6 +270,11 @@ OPTIONS SECTION
       <string> a null terminated ASCII string, trace clock used for events timestamps in
       this trace instance.
 
+  BTF_FILE: id 23, size 8
+    The BTF_FILE option data is:
+     A compressed data from the host file /sys/kernel/btf/vmlinux, using the
+     compression algorthim defined by the trace.dat header. The compression data
+     includes the size of the uncompressed output.
 
 HEADER INFO SECTION
 -------------------
@@ -438,6 +443,20 @@ STRINGS SECTION
   meta data, which is the offset of the actual string into the string section. Strings can be stored
   into multiple string sections in the file.
 
+BTF FILE SECTION
+----------------
+
+  Section ID: 23
+
+  Directly after the section header comes the information mapping
+  a PID to a process name.
+
+  The next 8 bytes contain a 64-bit word that holds the size of the
+  data mapping the PID to a process name.
+
+  The next set of data is of the size defined by the previous 8 bytes
+  and contains the information from /sys/kernel/btf/vmlinux.
+
 SEE ALSO
 --------
 trace-cmd(1), trace-cmd-record(1), trace-cmd-report(1), trace-cmd-start(1),
-- 
2.51.0