Please use GitHub pull requests for new patches. Avoid migrating existing patches. Phabricator shutdown timeline
Changeset View
Changeset View
Standalone View
Standalone View
llvm/lib/Target/BPF/BTF.h
Show First 20 Lines • Show All 54 Lines • ▼ Show 20 Lines | |||||
/// Sizes in bytes of various things in the BTF format. | /// Sizes in bytes of various things in the BTF format. | ||||
enum { | enum { | ||||
HeaderSize = 24, | HeaderSize = 24, | ||||
ExtHeaderSize = 32, | ExtHeaderSize = 32, | ||||
CommonTypeSize = 12, | CommonTypeSize = 12, | ||||
BTFArraySize = 12, | BTFArraySize = 12, | ||||
BTFEnumSize = 8, | BTFEnumSize = 8, | ||||
BTFEnum64Size = 12, | |||||
BTFMemberSize = 12, | BTFMemberSize = 12, | ||||
BTFParamSize = 8, | BTFParamSize = 8, | ||||
BTFDataSecVarSize = 12, | BTFDataSecVarSize = 12, | ||||
SecFuncInfoSize = 8, | SecFuncInfoSize = 8, | ||||
SecLineInfoSize = 8, | SecLineInfoSize = 8, | ||||
SecFieldRelocSize = 8, | SecFieldRelocSize = 8, | ||||
BPFFuncInfoSize = 8, | BPFFuncInfoSize = 8, | ||||
BPFLineInfoSize = 16, | BPFLineInfoSize = 16, | ||||
▲ Show 20 Lines • Show All 69 Lines • ▼ Show 20 Lines | |||||
/// BTF_KIND_ENUM is followed by multiple "struct BTFEnum". | /// BTF_KIND_ENUM is followed by multiple "struct BTFEnum". | ||||
/// The exact number of btf_enum is stored in the vlen (of the | /// The exact number of btf_enum is stored in the vlen (of the | ||||
/// info in "struct CommonType"). | /// info in "struct CommonType"). | ||||
struct BTFEnum { | struct BTFEnum { | ||||
uint32_t NameOff; ///< Enum name offset in the string table | uint32_t NameOff; ///< Enum name offset in the string table | ||||
int32_t Val; ///< Enum member value | int32_t Val; ///< Enum member value | ||||
}; | }; | ||||
/// BTF_KIND_ENUM64 is followed by multiple "struct BTFEnum64". | |||||
/// The exact number of BTFEnum64 is stored in the vlen (of the | |||||
/// info in "struct CommonType"). | |||||
struct BTFEnum64 { | |||||
uint32_t NameOff; ///< Enum name offset in the string table | |||||
uint32_t Val_Lo32; ///< Enum member lo32 value | |||||
uint32_t Val_Hi32; ///< Enum member hi32 value | |||||
}; | |||||
/// BTF_KIND_ARRAY is followed by one "struct BTFArray". | /// BTF_KIND_ARRAY is followed by one "struct BTFArray". | ||||
struct BTFArray { | struct BTFArray { | ||||
uint32_t ElemType; ///< Element type | uint32_t ElemType; ///< Element type | ||||
uint32_t IndexType; ///< Index type | uint32_t IndexType; ///< Index type | ||||
uint32_t Nelems; ///< Number of elements for this array | uint32_t Nelems; ///< Number of elements for this array | ||||
}; | }; | ||||
/// BTF_KIND_STRUCT and BTF_KIND_UNION are followed | /// BTF_KIND_STRUCT and BTF_KIND_UNION are followed | ||||
▲ Show 20 Lines • Show All 106 Lines • Show Last 20 Lines |