Lines Matching defs:btf_dedup

3150 struct btf_dedup;
3152 static struct btf_dedup *btf_dedup_new(struct btf *btf, const struct btf_dedup_opts *opts);
3153 static void btf_dedup_free(struct btf_dedup *d);
3154 static int btf_dedup_prep(struct btf_dedup *d);
3155 static int btf_dedup_strings(struct btf_dedup *d);
3156 static int btf_dedup_prim_types(struct btf_dedup *d);
3157 static int btf_dedup_struct_types(struct btf_dedup *d);
3158 static int btf_dedup_ref_types(struct btf_dedup *d);
3159 static int btf_dedup_resolve_fwds(struct btf_dedup *d);
3160 static int btf_dedup_compact_types(struct btf_dedup *d);
3161 static int btf_dedup_remap_types(struct btf_dedup *d);
3176 * More verbose and detailed description of both problem btf_dedup is solving,
3286 * `btf_dedup->map` array. This map is also used to record STRUCT/UNION that
3290 * index (`btf_dedup->dedup_table`), which maps type descriptor's signature hash
3303 struct btf_dedup *d;
3369 struct btf_dedup {
3413 static int btf_dedup_table_add(struct btf_dedup *d, long hash, __u32 type_id)
3418 static int btf_dedup_hypot_map_add(struct btf_dedup *d,
3435 static void btf_dedup_clear_hypot_map(struct btf_dedup *d)
3445 static void btf_dedup_free(struct btf_dedup *d)
3477 static struct btf_dedup *btf_dedup_new(struct btf *btf, const struct btf_dedup_opts *opts)
3479 struct btf_dedup *d = calloc(1, sizeof(struct btf_dedup));
3538 static int btf_for_each_str_off(struct btf_dedup *d, str_off_visit_fn fn, void *ctx)
3562 struct btf_dedup *d = ctx;
3601 static int btf_dedup_strings(struct btf_dedup *d)
3938 static int btf_dedup_prep(struct btf_dedup *d)
4002 * canonical and is added into `btf_dedup->dedup_table` as another candidate.
4004 static int btf_dedup_prim_type(struct btf_dedup *d, __u32 type_id)
4089 static int btf_dedup_prim_types(struct btf_dedup *d)
4104 static inline bool is_type_mapped(struct btf_dedup *d, uint32_t type_id)
4114 static inline __u32 resolve_type_id(struct btf_dedup *d, __u32 type_id)
4125 static uint32_t resolve_fwd_id(struct btf_dedup *d, uint32_t type_id)
4148 static bool btf_dedup_identical_arrays(struct btf_dedup *d, __u32 id1, __u32 id2)
4161 static bool btf_dedup_identical_structs(struct btf_dedup *d, __u32 id1, __u32 id2)
4204 * a `cand_id` is recored in hypothetical mapping (`btf_dedup->hypot_map`).
4235 * unlikely to happen, but btf_dedup API allows to disable FWD resolution if
4280 static int btf_dedup_is_equiv(struct btf_dedup *d, __u32 cand_id,
4466 static void btf_dedup_merge_hypot_map(struct btf_dedup *d)
4541 * (btf_dedup->hypot_map) produced by aforementioned type graph equivalence
4548 * as canonical for itself and is added into btf_dedup->dedup_table hash map
4551 static int btf_dedup_struct_type(struct btf_dedup *d, __u32 type_id)
4609 static int btf_dedup_struct_types(struct btf_dedup *d)
4643 * btf_dedup->dedup_table as another possible canonical representative.
4645 static int btf_dedup_ref_type(struct btf_dedup *d, __u32 type_id)
4771 static int btf_dedup_ref_types(struct btf_dedup *d)
4791 static int btf_dedup_fill_unique_names_map(struct btf_dedup *d, struct hashmap *names_map)
4825 static int btf_dedup_resolve_fwd(struct btf_dedup *d, struct hashmap *names_map, __u32 type_id)
4890 static int btf_dedup_resolve_fwds(struct btf_dedup *d)
4920 * duplicates. During compaction btf_dedup->hypot_map array is reused to store
4925 static int btf_dedup_compact_types(struct btf_dedup *d)
4976 * then mapping it to a deduplicated type ID, stored in btf_dedup->hypot_map,
4981 struct btf_dedup *d = ctx;
4998 * deduped type ID is stored in btf_dedup->hypot_map and is populated during
5003 static int btf_dedup_remap_types(struct btf_dedup *d)