/* All offsets are in bytes relative to the end of this header */
__u32 type_off; /* offset of type section */
__u32 type_len; /* length of type section */
__u32 str_off; /* offset of string section */
__u32 str_len; /* length of string section */
};
/* Max # of type identifier */ #define BTF_MAX_TYPE 0x000fffff /* Max offset into the string section */ #define BTF_MAX_NAME_OFFSET 0x00ffffff /* Max # of struct/union/enum members or func args */ #define BTF_MAX_VLEN 0xffff
struct btf_type {
__u32 name_off; /* "info" bits arrangement *bits0-15:vlen(e.g.#ofstruct'smembers) *bits16-23:unused *bits24-28:kind(e.g.int,ptr,array...etc) *bits29-30:unused *bit31:kind_flag,currentlyusedby *struct,union,enum,fwd,enum64, *decl_tagandtype_tag
*/
__u32 info; /* "size" is used by INT, ENUM, STRUCT, UNION, DATASEC and ENUM64. *"size"tellsthesizeofthetypeitisdescribing. * *"type"isusedbyPTR,TYPEDEF,VOLATILE,CONST,RESTRICT, *FUNC,FUNC_PROTO,VAR,DECL_TAGandTYPE_TAG. *"type"isatype_idreferringtoanothertype.
*/ union {
__u32 size;
__u32 type;
};
};
/* For some specific BTF_KIND, "struct btf_type" is immediately *followedbyextradata.
*/
/* BTF_KIND_INT is followed by a u32 and the following *isthe32bitsarrangement:
*/ #define BTF_INT_ENCODING(VAL) (((VAL) & 0x0f000000) >> 24) #define BTF_INT_OFFSET(VAL) (((VAL) & 0x00ff0000) >> 16) #define BTF_INT_BITS(VAL) ((VAL) & 0x000000ff)
/* BTF_KIND_ENUM is followed by multiple "struct btf_enum". *Theexactnumberofbtf_enumisstoredinthevlen(ofthe *infoin"structbtf_type").
*/ struct btf_enum {
__u32 name_off;
__s32 val;
};
/* BTF_KIND_ARRAY is followed by one "struct btf_array" */ struct btf_array {
__u32 type;
__u32 index_type;
__u32 nelems;
};
/* BTF_KIND_STRUCT and BTF_KIND_UNION are followed *bymultiple"structbtf_member".Theexactnumber *ofbtf_memberisstoredinthevlen(oftheinfoin *"structbtf_type").
*/ struct btf_member {
__u32 name_off;
__u32 type; /* If the type info kind_flag is set, the btf_member offset *containsbothmemberbitfieldsizeandbitoffset.The *bitfieldsizeissetforbitfieldmembers.Ifthetype *infokind_flagisnotset,theoffsetcontainsonlybit *offset.
*/
__u32 offset;
};
/* If the struct/union type info kind_flag is set, the *followingtwomacrosareusedtoaccessbitfield_size *andbit_offsetfrombtf_member.offset.
*/ #define BTF_MEMBER_BITFIELD_SIZE(val) ((val) >> 24) #define BTF_MEMBER_BIT_OFFSET(val) ((val) & 0xffffff)
/* BTF_KIND_FUNC_PROTO is followed by multiple "struct btf_param". *Theexactnumberofbtf_paramisstoredinthevlen(ofthe *infoin"structbtf_type").
*/ struct btf_param {
__u32 name_off;
__u32 type;
};
/* BTF_KIND_VAR is followed by a single "struct btf_var" to describe *additionalinformationrelatedtothevariablesuchasitslinkage.
*/ struct btf_var {
__u32 linkage;
};
/* BTF_KIND_DATASEC is followed by multiple "struct btf_var_secinfo" *todescribeallBTF_KIND_VARtypesitcontainsalongwithit's *in-sectionoffsetaswellassize.
*/ struct btf_var_secinfo {
__u32 type;
__u32 offset;
__u32 size;
};
/* BTF_KIND_DECL_TAG is followed by a single "struct btf_decl_tag" to describe *additionalinformationrelatedtothetagappliedlocation. *Ifcomponent_idx==-1,thetagisappliedtoastruct,union, *variableorfunction.Otherwise,itisappliedtoastruct/union *memberorafuncargument,andcomponent_idxindicateswhichmember *orargument(0...vlen-1).
*/ struct btf_decl_tag {
__s32 component_idx;
};
/* BTF_KIND_ENUM64 is followed by multiple "struct btf_enum64". *Theexactnumberofbtf_enum64isstoredinthevlen(ofthe *infoin"structbtf_type").
*/ struct btf_enum64 {
__u32 name_off;
__u32 val_lo32;
__u32 val_hi32;
};
#endif/* _UAPI__LINUX_BTF_H__ */
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.10 Sekunden
(vorverarbeitet am 2026-09-28)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.