Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\bpf\btf.c Create Date:2022-07-28 13:19:17
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:btf_struct_seq_show

Proto:static void btf_struct_seq_show(const struct btf *btf, const struct btf_type *t, u32 type_id, void *data, u8 bits_offset, struct seq_file *m)

Type:void

Parameter:

TypeParameterName
const struct btf *btf
const struct btf_type *t
u32type_id
void *data
u8bits_offset
struct seq_file *m
2329  seq = If BTF_INFO_KIND( "info" bits arrangement * bits 0-15: vlen (e.g. # of struct's members) * bits 16-23: unused * bits 24-27: kind (e.g. int, ptr, array...etc) * bits 28-30: unused * bit 31: kind_flag, currently used by * struct, union and fwd) == Union Then "|" Else ","
2333  seq_puts(m, "{")
2335  member_type = btf_type_by_id(btf, type)
2342  If i Then seq_puts(m, seq)
2345  member_offset = btf_member_bit_offset(t, member)
2346  bitfield_size = btf_member_bitfield_size(t, member)
2347  bytes_offset = BITS_ROUNDDOWN_BYTES(member_offset)
2348  bits8_offset = BITS_PER_BYTE_MASKED(member_offset)
2349  If bitfield_size Then
2350  btf_bitfield_seq_show(data + bytes_offset, bits8_offset, bitfield_size, m)
2352  Else
2353  ops = btf_type_ops(member_type)
2354  seq_show(btf, member_type, type, data + bytes_offset, bits8_offset, m)
2358  seq_puts(m, "}")