/tools/bpf/bpftool/Documentation/ |
D | bpftool-btf.rst | 100 [1] PTR '(anon)' type_id=2 102 'pad' type_id=3 bits_offset=0 103 'sock' type_id=4 bits_offset=64 105 [4] PTR '(anon)' type_id=5 155 [1] PTR '(anon)' type_id=2 157 'a' type_id=3 bits_offset=0 158 'b' type_id=4 bits_offset=0 161 'const_int_field' type_id=5 bits_offset=0 162 'bitfield_field' type_id=3 bits_offset=32 bitfield_size=4 163 'arr_field' type_id=8 bits_offset=40 [all …]
|
D | bpftool-gen.rst | 389 [2] CONST '(anon)' type_id=1 390 [3] VOLATILE '(anon)' type_id=1 391 [4] ARRAY '(anon)' type_id=1 index_type_id=21 nr_elems=2 392 [5] PTR '(anon)' type_id=8 393 [6] CONST '(anon)' type_id=5 395 [8] CONST '(anon)' type_id=7 403 [1] PTR '(anon)' type_id=2 405 'ent' type_id=3 bits_offset=0 406 'id' type_id=7 bits_offset=64 407 'args' type_id=9 bits_offset=128 [all …]
|
/tools/testing/selftests/bpf/prog_tests/ |
D | resolve_btfids.c | 66 __resolve_symbol(struct btf *btf, int type_id) in BTF_ID() 72 type = btf__type_by_id(btf, type_id); in BTF_ID() 74 PRINT_FAIL("Failed to get type for ID %d\n", type_id); in BTF_ID() 87 PRINT_FAIL("Failed to get name for BTF ID %d\n", type_id); in BTF_ID() 92 test_symbols[i].id = type_id; in BTF_ID() 101 int type_id; in resolve_symbols() local 111 for (type_id = 1; type_id < nr; type_id++) { in resolve_symbols() 112 if (__resolve_symbol(btf, type_id)) in resolve_symbols()
|
D | btf_module.c | 13 __s32 type_id; in test_btf_module() local 28 type_id = btf__find_by_name(module_btf, symbol_name); in test_btf_module() 29 ASSERT_GT(type_id, 0, "func not found"); in test_btf_module()
|
D | btf_dump.c | 275 __s32 type_id; in btf_dump_data() local 289 type_id = btf__find_by_name(btf, name); in btf_dump_data() 290 if (!ASSERT_GE(type_id, 0, "find type id")) in btf_dump_data() 292 type_sz = btf__resolve_size(btf, type_id); in btf_dump_data() 294 ret = btf_dump__dump_type_data(d, type_id, ptr, ptr_sz, &opts); in btf_dump_data() 575 __s32 type_id; in test_btf_dump_struct_data() local 645 type_id = btf__find_by_name(btf, "file_operations"); in test_btf_dump_struct_data() 646 if (ASSERT_GT(type_id, 0, "find type id")) { in test_btf_dump_struct_data() 647 type_sz = btf__resolve_size(btf, type_id); in test_btf_dump_struct_data() 650 ret = btf_dump__dump_type_data(d, type_id, fops, type_sz, &opts); in test_btf_dump_struct_data() [all …]
|
D | btf_tag.c | 58 __s32 type_id; in load_btfs() local 73 type_id = btf__find_by_name_kind(*vmlinux_btf, "user", BTF_KIND_TYPE_TAG); in load_btfs() 74 if (type_id <= 0) { in load_btfs() 90 type_id = btf__find_by_name_kind(*module_btf, "user", BTF_KIND_TYPE_TAG); in load_btfs() 91 if (type_id <= 0) { in load_btfs()
|
/tools/bpf/bpftool/ |
D | btf_dumper.c | 24 static int btf_dumper_do_type(const struct btf_dumper *d, __u32 type_id, 80 func_type = btf__type_by_id(prog_btf, finfo.type_id); in dump_prog_id_as_func_ptr() 135 static int btf_dumper_modifier(const struct btf_dumper *d, __u32 type_id, in btf_dumper_modifier() argument 140 actual_type_id = btf__resolve_type(d->btf, type_id); in btf_dumper_modifier() 247 static int btf_dumper_array(const struct btf_dumper *d, __u32 type_id, in btf_dumper_array() argument 250 const struct btf_type *t = btf__type_by_id(d->btf, type_id); in btf_dumper_array() 465 static int btf_dumper_struct(const struct btf_dumper *d, __u32 type_id, in btf_dumper_struct() argument 475 t = btf__type_by_id(d->btf, type_id); in btf_dumper_struct() 513 static int btf_dumper_var(const struct btf_dumper *d, __u32 type_id, in btf_dumper_var() argument 516 const struct btf_type *t = btf__type_by_id(d->btf, type_id); in btf_dumper_var() [all …]
|
D | gen.c | 1719 static void btfgen_mark_member(struct btfgen_info *info, int type_id, int idx) in btfgen_mark_member() argument 1721 const struct btf_type *t = btf__type_by_id(info->marked_btf, type_id); in btfgen_mark_member() 1728 btfgen_mark_type(struct btfgen_info *info, unsigned int type_id, bool follow_pointers) in btfgen_mark_type() argument 1730 const struct btf_type *btf_type = btf__type_by_id(info->src_btf, type_id); in btfgen_mark_type() 1736 if (type_id == 0) in btfgen_mark_type() 1740 cloned_type = (struct btf_type *) btf__type_by_id(info->marked_btf, type_id); in btfgen_mark_type() 1795 p_err("unsupported kind: %s (%d)", btf_kind_str(btf_type), type_id); in btfgen_mark_type() 1808 unsigned int type_id = targ_spec->root_type_id; in btfgen_record_field_relo() local 1812 btf_type = btf__type_by_id(btf, type_id); in btfgen_record_field_relo() 1813 err = btfgen_mark_type(info, type_id, false); in btfgen_record_field_relo() [all …]
|
D | xlated_dumper.c | 249 btf_dumper_type_only(btf, record->type_id, in dump_xlated_json() 330 btf_dumper_type_only(btf, record->type_id, in dump_xlated_plain() 399 btf_dumper_type_only(btf, record->type_id, in dump_xlated_for_graph()
|
D | main.h | 223 int btf_dumper_type(const struct btf_dumper *d, __u32 type_id,
|
/tools/lib/bpf/ |
D | btf.c | 462 struct btf_type *btf_type_by_id(const struct btf *btf, __u32 type_id) in btf_type_by_id() argument 464 if (type_id == 0) in btf_type_by_id() 466 if (type_id < btf->start_id) in btf_type_by_id() 467 return btf_type_by_id(btf->base_btf, type_id); in btf_type_by_id() 468 return btf->types_data + btf->type_offs[type_id - btf->start_id]; in btf_type_by_id() 471 const struct btf_type *btf__type_by_id(const struct btf *btf, __u32 type_id) in btf__type_by_id() argument 473 if (type_id >= btf->start_id + btf->nr_types) in btf__type_by_id() 475 return btf_type_by_id((struct btf *)btf, type_id); in btf__type_by_id() 604 __s64 btf__resolve_size(const struct btf *btf, __u32 type_id) in btf__resolve_size() argument 612 t = btf__type_by_id(btf, type_id); in btf__resolve_size() [all …]
|
D | relo_core.c | 32 static s64 btf__resolve_size(const struct btf *btf, u32 type_id) in btf__resolve_size() argument 37 t = btf_type_by_id(btf, type_id); in btf__resolve_size() 82 t = btf_type_by_id(btf, acc->type_id); in is_flex_arr() 280 spec->root_type_id = relo->type_id; in bpf_core_parse_spec() 305 t = skip_mods_and_typedefs(btf, relo->type_id, &id); in bpf_core_parse_spec() 311 acc->type_id = id; in bpf_core_parse_spec() 358 acc->type_id = id; in bpf_core_parse_spec() 377 spec->spec[spec->len].type_id = id; in bpf_core_parse_spec() 387 prog_name, relo->type_id, spec_str, i, id, btf_kind_str(t)); in bpf_core_parse_spec() 500 local_id = local_acc->type_id; in bpf_core_match_member() [all …]
|
D | btf.h | 136 LIBBPF_API __s64 btf__resolve_size(const struct btf *btf, __u32 type_id); 137 LIBBPF_API int btf__resolve_type(const struct btf *btf, __u32 type_id); 210 LIBBPF_API int btf__add_func_param(struct btf *btf, const char *name, int type_id); 213 LIBBPF_API int btf__add_var(struct btf *btf, const char *name, int linkage, int type_id);
|
D | relo_core.h | 24 __u32 type_id; /* struct/union type or array element type */ member
|
D | btf_dump.c | 1851 static bool ptr_is_aligned(const struct btf *btf, __u32 type_id, in ptr_is_aligned() argument 1854 int alignment = btf__align_of(btf, type_id); in ptr_is_aligned() 1864 __u32 type_id, in btf_dump_int_data() argument 1874 pr_warn("unexpected size %d for id [%u]\n", sz, type_id); in btf_dump_int_data() 1881 if (!ptr_is_aligned(d->btf, type_id, data)) { in btf_dump_int_data() 1948 pr_warn("unexpected sz %d for id [%u]\n", sz, type_id); in btf_dump_int_data() 1962 __u32 type_id, in btf_dump_float_data() argument 1970 if (!ptr_is_aligned(d->btf, type_id, data)) { in btf_dump_float_data() 1986 pr_warn("unexpected size %d for id [%u]\n", sz, type_id); in btf_dump_float_data() 2000 __u32 type_id; in btf_dump_var_data() local [all …]
|
D | libbpf_internal.h | 233 struct btf_type *btf_type_by_id(const struct btf *btf, __u32 type_id); 478 __u32 type_id; member 490 typedef int (*type_id_visit_fn)(__u32 *type_id, void *ctx);
|
D | linker.c | 915 static int check_btf_type_id(__u32 *type_id, void *ctx) in check_btf_type_id() argument 919 if (*type_id >= btf__type_cnt(btf)) in check_btf_type_id() 2225 static int remap_type_id(__u32 *type_id, void *ctx) in remap_type_id() argument 2228 int new_id = id_map[*type_id]; in remap_type_id() 2231 if (new_id == 0 && *type_id != 0) { in remap_type_id() 2232 pr_warn("failed to find new ID mapping for original BTF type ID %u\n", *type_id); in remap_type_id() 2236 *type_id = id_map[*type_id]; in remap_type_id() 2475 dst_rec->type_id = obj->btf_type_map[dst_rec->type_id]; in linker_append_btf_ext() 2546 dst_rec->type_id = obj->btf_type_map[dst_rec->type_id]; in linker_append_btf_ext()
|
/tools/bpf/resolve_btfids/ |
D | main.c | 530 int err, type_id; in symbols_resolve() local 558 for (type_id = 1; type_id < nr_types; type_id++) { in symbols_resolve() 565 type = btf__type_by_id(btf, type_id); in symbols_resolve() 568 type_id); in symbols_resolve() 590 type_id); in symbols_resolve() 598 str, id->id, type_id, id->id); in symbols_resolve() 600 id->id = type_id; in symbols_resolve()
|
/tools/testing/selftests/bpf/ |
D | btf_helpers.h | 10 const char *btf_type_raw_dump(const struct btf *btf, int type_id);
|
D | btf_helpers.c | 216 const char *btf_type_raw_dump(const struct btf *btf, int type_id) in btf_type_raw_dump() argument 227 fprintf_btf_type_raw(buf_file, btf, type_id); in btf_type_raw_dump()
|
/tools/testing/selftests/bpf/progs/ |
D | btf_ptr.h | 18 __u32 type_id; member
|
D | bpf_iter_task_btf.c | 24 ptr.type_id = bpf_core_type_id_kernel(struct task_struct); in dump_task_struct()
|
D | netif_receive_skb.c | 66 _ptr.type_id = bpf_core_type_id_kernel(_type); \ 67 if (_ptr.type_id <= 0) { \ 111 p.type_id = bpf_core_type_id_kernel(struct sk_buff); in BPF_PROG()
|
D | bpf_iter.h | 153 __u32 type_id; member
|
/tools/perf/util/ |
D | bpf_off_cpu.c | 103 u32 type_id; in check_sched_switch_args() local 105 type_id = btf__find_by_name_kind(btf, "btf_trace_sched_switch", in check_sched_switch_args() 107 if ((s32)type_id < 0) in check_sched_switch_args() 110 t1 = btf__type_by_id(btf, type_id); in check_sched_switch_args()
|