Lines Matching defs:btf_dedup
2888 struct btf_dedup;
2890 static struct btf_dedup *btf_dedup_new(struct btf *btf, const struct btf_dedup_opts *opts);
2891 static void btf_dedup_free(struct btf_dedup *d);
2892 static int btf_dedup_prep(struct btf_dedup *d);
2893 static int btf_dedup_strings(struct btf_dedup *d);
2894 static int btf_dedup_prim_types(struct btf_dedup *d);
2895 static int btf_dedup_struct_types(struct btf_dedup *d);
2896 static int btf_dedup_ref_types(struct btf_dedup *d);
2897 static int btf_dedup_resolve_fwds(struct btf_dedup *d);
2898 static int btf_dedup_compact_types(struct btf_dedup *d);
2899 static int btf_dedup_remap_types(struct btf_dedup *d);
2914 * More verbose and detailed description of both problem btf_dedup is solving,
3024 * `btf_dedup->map` array. This map is also used to record STRUCT/UNION that
3028 * index (`btf_dedup->dedup_table`), which maps type descriptor's signature hash
3041 struct btf_dedup *d;
3107 struct btf_dedup {
3151 static int btf_dedup_table_add(struct btf_dedup *d, long hash, __u32 type_id)
3156 static int btf_dedup_hypot_map_add(struct btf_dedup *d,
3173 static void btf_dedup_clear_hypot_map(struct btf_dedup *d)
3183 static void btf_dedup_free(struct btf_dedup *d)
3215 static struct btf_dedup *btf_dedup_new(struct btf *btf, const struct btf_dedup_opts *opts)
3217 struct btf_dedup *d = calloc(1, sizeof(struct btf_dedup));
3276 static int btf_for_each_str_off(struct btf_dedup *d, str_off_visit_fn fn, void *ctx)
3300 struct btf_dedup *d = ctx;
3339 static int btf_dedup_strings(struct btf_dedup *d)
3676 static int btf_dedup_prep(struct btf_dedup *d)
3740 * canonical and is added into `btf_dedup->dedup_table` as another candidate.
3742 static int btf_dedup_prim_type(struct btf_dedup *d, __u32 type_id)
3827 static int btf_dedup_prim_types(struct btf_dedup *d)
3842 static inline bool is_type_mapped(struct btf_dedup *d, uint32_t type_id)
3852 static inline __u32 resolve_type_id(struct btf_dedup *d, __u32 type_id)
3863 static uint32_t resolve_fwd_id(struct btf_dedup *d, uint32_t type_id)
3886 static bool btf_dedup_identical_arrays(struct btf_dedup *d, __u32 id1, __u32 id2)
3899 static bool btf_dedup_identical_structs(struct btf_dedup *d, __u32 id1, __u32 id2)
3942 * a `cand_id` is recored in hypothetical mapping (`btf_dedup->hypot_map`).
3973 * unlikely to happen, but btf_dedup API allows to disable FWD resolution if
4018 static int btf_dedup_is_equiv(struct btf_dedup *d, __u32 cand_id,
4204 static void btf_dedup_merge_hypot_map(struct btf_dedup *d)
4279 * (btf_dedup->hypot_map) produced by aforementioned type graph equivalence
4286 * as canonical for itself and is added into btf_dedup->dedup_table hash map
4289 static int btf_dedup_struct_type(struct btf_dedup *d, __u32 type_id)
4347 static int btf_dedup_struct_types(struct btf_dedup *d)
4381 * btf_dedup->dedup_table as another possible canonical representative.
4383 static int btf_dedup_ref_type(struct btf_dedup *d, __u32 type_id)
4509 static int btf_dedup_ref_types(struct btf_dedup *d)
4529 static int btf_dedup_fill_unique_names_map(struct btf_dedup *d, struct hashmap *names_map)
4563 static int btf_dedup_resolve_fwd(struct btf_dedup *d, struct hashmap *names_map, __u32 type_id)
4628 static int btf_dedup_resolve_fwds(struct btf_dedup *d)
4658 * duplicates. During compaction btf_dedup->hypot_map array is reused to store
4663 static int btf_dedup_compact_types(struct btf_dedup *d)
4714 * then mapping it to a deduplicated type ID, stored in btf_dedup->hypot_map,
4719 struct btf_dedup *d = ctx;
4736 * deduped type ID is stored in btf_dedup->hypot_map and is populated during
4741 static int btf_dedup_remap_types(struct btf_dedup *d)