]> www.infradead.org Git - users/hch/misc.git/commitdiff
perf tools: Update header documentation on BPF_PROG_INFO
authorThomas Richter <tmricht@linux.ibm.com>
Tue, 5 Aug 2025 09:03:49 +0000 (11:03 +0200)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Fri, 19 Sep 2025 15:14:30 +0000 (12:14 -0300)
Update the perf.data file format description on header section
HEADER_BPF_PROG_INFO.

The information is taken from process_bpf_prog_info() and
write_bpf_prog_info() from file util/header.c.

Reviewed-by: Jan Polensky <japo@linux.ibm.com>
Signed-off-by: Thomas Richter <tmricht@linux.ibm.com>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Acked-by: Sumanth Korikkar <sumanthk@linux.ibm.com>
Cc: Alexander Gordeev <agordeev@linux.ibm.com>
Cc: Heiko Carstens <hca@linux.ibm.com>
Cc: Vasily Gorbik <gor@linux.ibm.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/Documentation/perf.data-file-format.txt

index cd95ba09f7270717e1e3ea2234e8f67b256847c3..c9d4dec6534409b3ce4d0df56e70a9e3ba0942d5 100644 (file)
@@ -348,6 +348,16 @@ to special needs.
 
 struct perf_bpil, which contains detailed information about
 a BPF program, including type, id, tag, jited/xlated instructions, etc.
+The format of data in HEADER_BPF_PROG_INFO is as follows:
+       u32 count
+
+       struct perf_bpil {
+               u32 info_len;   /* size of struct bpf_prog_info, when the tool is compiled */
+               u32 data_len;   /* total bytes allocated for data, round up to 8 bytes */
+               u64 arrays;     /* which arrays are included in data */
+               struct bpf_prog_info info;
+               u8  data[];
+       }[count];
 
         HEADER_BPF_BTF = 26,