Lines Matching refs:BTF

2 BPF Type Format (BTF)
8 BTF (BPF Type Format) is the metadata format which encodes the debug info
9 related to BPF program/map. The name BTF was used initially to describe data
10 types. The BTF was later extended to include function info for defined
18 The BTF specification contains two parts,
19 * BTF kernel API
20 * BTF ELF file format
23 verifies the BTF info before using it. The ELF file format is a user space
26 The type and string sections are part of the BTF kernel API, describing the
32 2. BTF Type and String Encoding
54 endian systems, and can be used to test whether BTF is generated for big- or
215 Currently in BTF, beyond type verification, the ``index_type`` is not used.
229 more BTF usage is explored, pahole and llvm can be changed to generate proper
554 3. BTF Kernel API
557 The following bpf syscall command involves BTF:
558 * BPF_BTF_LOAD: load a blob of BTF data into kernel
600 Load a blob of BTF data into kernel. A blob of data, described in
609 __u32 btf_fd; /* fd pointing to a BTF type data */
610 __u32 btf_key_type_id; /* BTF type_id of the key */
611 __u32 btf_value_type_id; /* BTF type_id of the value */
638 __u32 prog_btf_fd; /* fd pointing to BTF type data */
698 information from kernel about this fd, some of which are BTF-related. For
718 4.1 .BTF section
721 The .BTF section contains type and string data. The format of this section is
726 4.2 .BTF.ext section
729 The .BTF.ext section encodes func_info and line_info which needs loader
732 The specification for .BTF.ext section is defined at ``tools/lib/bpf/btf.h``
735 The current header of .BTF.ext section::
750 It is very similar to .BTF section. Instead of type/string section, it
762 .BTF.ext is generated. ``btf_ext_info_sec``, defined below, is a collection of
782 .BTF.ext is generated.
793 The .BTF_ids section encodes BTF ID values that are used within the kernel.
797 use them to create lists and sets (sorted lists) of BTF ID values.
799 The ``BTF_ID_LIST`` and ``BTF_ID`` macros define unsorted list of BTF ID values,
823 The ``BTF_SET_START/END`` macros pair defines sorted list of BTF ID values
846 and is used as a filter when resolving the BTF ID value.
848 All the BTF ID lists and sets are compiled in the .BTF_ids section and
851 5. Using BTF
857 With BTF, the map key/value can be printed based on fields rather than simply
955 6. BTF Generation
963 support .BTF.ext and btf BTF_KIND_FUNC type yet. For example,::
980 The llvm is able to generate .BTF and .BTF.ext directly with -g for bpf target
981 only. The assembly code (-S) is able to show the BTF encoding in assembly
996 [ 8] .BTF PROGBITS 0000000000000000 00000247
998 [ 9] .BTF.ext PROGBITS 0000000000000000 000003b5
1000 [10] .rel.BTF.ext REL 0000000000000000 000007e0
1006 .section .BTF,"",@progbits
1034 .section .BTF.ext,"",@progbits
1066 provides an extensive set of BTF-related tests.