diff options
author | Mykyta Yatsenko <yatsenko@meta.com> | 2024-09-06 14:24:53 +0100 |
---|---|---|
committer | Andrii Nakryiko <andrii@kernel.org> | 2024-09-06 14:06:30 -0700 |
commit | f8c6b7913dfaa67475883f94261c278adbcaa0ae (patch) | |
tree | 61f1e8d7c90d9a3c50f121f878d98869b348ec20 /tools/lib/bpf/libbpf.c | |
parent | 04bb60d0dfd13ac51c0294ea1c3b78a783b7d22d (diff) |
bpftool: Improve btf c dump sorting stability
Existing algorithm for BTF C dump sorting uses only types and names of
the structs and unions for ordering. As dump contains structs with the
same names but different contents, relative to each other ordering of
those structs will be accidental.
This patch addresses this problem by introducing a new sorting field
that contains hash of the struct/union field names and types to
disambiguate comparison of the non-unique named structs.
Signed-off-by: Mykyta Yatsenko <yatsenko@meta.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20240906132453.146085-1-mykyta.yatsenko5@gmail.com
Diffstat (limited to 'tools/lib/bpf/libbpf.c')
0 files changed, 0 insertions, 0 deletions