]> git.baikalelectronics.ru Git - kernel.git/commit
perf/bpf_counter: Use bpf_map_create instead of bpf_create_map
authorSong Liu <song@kernel.org>
Tue, 7 Dec 2021 23:23:40 +0000 (15:23 -0800)
committerAndrii Nakryiko <andrii@kernel.org>
Wed, 8 Dec 2021 19:55:45 +0000 (11:55 -0800)
commit27422d7e4c1925cc1c33b6c323e3534ae91d0288
tree6f0357ac11d1631292f3d652a2f54013b2f4dc0d
parentf525a0afd6e1372b18ef6139a1001d89cfa8989b
perf/bpf_counter: Use bpf_map_create instead of bpf_create_map

bpf_create_map is deprecated. Replace it with bpf_map_create. Also add a
__weak bpf_map_create() so that when older version of libbpf is linked as
a shared library, it falls back to bpf_create_map().

Fixes: 268406bd8e09 ("libbpf: Unify low-level map creation APIs w/ new bpf_map_create()")
Signed-off-by: Song Liu <song@kernel.org>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20211207232340.2561471-1-song@kernel.org
tools/perf/util/bpf_counter.c