mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-04-24 14:07:52 -04:00
bpftool: Support BTF_KIND_TYPE_TAG
Add bpftool support for BTF_KIND_TYPE_TAG. Signed-off-by: Yonghong Song <yhs@fb.com> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Acked-by: Andrii Nakryiko <andrii@kernel.org> Link: https://lore.kernel.org/bpf/20211112012620.1505506-1-yhs@fb.com
This commit is contained in:
parent
2dc1e488e5
commit
3da5ba6f05
1 changed files with 2 additions and 0 deletions
|
@ -39,6 +39,7 @@ static const char * const btf_kind_str[NR_BTF_KINDS] = {
|
||||||
[BTF_KIND_DATASEC] = "DATASEC",
|
[BTF_KIND_DATASEC] = "DATASEC",
|
||||||
[BTF_KIND_FLOAT] = "FLOAT",
|
[BTF_KIND_FLOAT] = "FLOAT",
|
||||||
[BTF_KIND_DECL_TAG] = "DECL_TAG",
|
[BTF_KIND_DECL_TAG] = "DECL_TAG",
|
||||||
|
[BTF_KIND_TYPE_TAG] = "TYPE_TAG",
|
||||||
};
|
};
|
||||||
|
|
||||||
struct btf_attach_point {
|
struct btf_attach_point {
|
||||||
|
@ -142,6 +143,7 @@ static int dump_btf_type(const struct btf *btf, __u32 id,
|
||||||
case BTF_KIND_VOLATILE:
|
case BTF_KIND_VOLATILE:
|
||||||
case BTF_KIND_RESTRICT:
|
case BTF_KIND_RESTRICT:
|
||||||
case BTF_KIND_TYPEDEF:
|
case BTF_KIND_TYPEDEF:
|
||||||
|
case BTF_KIND_TYPE_TAG:
|
||||||
if (json_output)
|
if (json_output)
|
||||||
jsonw_uint_field(w, "type_id", t->type);
|
jsonw_uint_field(w, "type_id", t->type);
|
||||||
else
|
else
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue