diff options
author | Andrii Nakryiko <andrii@kernel.org> | 2021-04-23 11:13:36 -0700 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2021-04-23 14:05:26 -0700 |
commit | c7ef5ec9573f05535370d8716576263681cabec7 (patch) | |
tree | 68508d7da319263b308001faabb28714e3ad6979 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | 6245947c1b3c6783976e3af113bac30250d0a93e (diff) |
libbpf: Refactor BTF map definition parsing
Refactor BTF-defined maps parsing logic to allow it to be nicely reused by BPF
static linker. Further, at least for BPF static linker, it's important to know
which attributes of a BPF map were defined explicitly, so provide a bit set
for each known portion of BTF map definition. This allows BPF static linker to
do a simple check when dealing with extern map declarations.
The same capabilities allow to distinguish attributes explicitly set to zero
(e.g., __uint(max_entries, 0)) vs the case of not specifying it at all (no
max_entries attribute at all). Libbpf is currently not utilizing that, but it
could be useful for backwards compatibility reasons later.
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Yonghong Song <yhs@fb.com>
Link: https://lore.kernel.org/bpf/20210423181348.1801389-7-andrii@kernel.org
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions